How to check POP3 mailbox for new messages via Powershell? - email

Is it possible to check POP3 mailbox for new e-mails via Powershell? And if possible, how can this be achieved?
This link provides some information but doesn't suit me. I know about NetCmdlets but would prefer not to use commercial tools. Also I do not want to start outlook.application. In fact, my goal is to avoid starting outlook, as long as it possible (for performance reasons)

As far as I know, there is no native POP3 class in the .NET FRAMEWORK. So you can write one using sockets or you can use an exe client. You can try GetMail for Windows.

What about creating a TCP connection using TCPClient, and next, create a NetworkStream object, connected to the TCPClient object, to read data from the server?
You'll need System.Net.Sockets and System.Net.IO.
Anyway I would search for a C# answer and then try to get it to powershell.

Related

Sockets used to send messages between machines

I want to make a sort of chat server between my desktop and my laptop using sockets. Does anybody know of a good tutorial on this or if you have any files with comments on it that I can use as reference?
This could be good at the beginning of your adventure:
https://medium.com/swlh/lets-write-a-chat-app-in-python-f6783a9ac170

Does JavaMail support server-push?

Does JavaMail support notification of new emails through server-push?
If yes, where is the documentation for that?
If no, is there a library that can do it?
You should be using IMAPFolder's idle function to issue the idle command to the server. That will then listen for events, such as a new mail or deleted mail. (See the IMAP spec to see what the messages look like). And you should be using a MessageCountListener to execute code when a number of emails in the mailbox change.
IMAP's idle function is exactly meant to imitate "push" functionality.
http://java.sun.com/products/javamail/javadocs/javax/mail/event/MessageCountListener.html
http://java.sun.com/products/javamail/javadocs/com/sun/mail/imap/IMAPFolder.html
Sorry I didn't post any code that shows how this is used. I didn't want to waste my time since there are many readily available examples on the internet if you search for this stuff.
But be forewarned, this method won't work for more than one IMAP account since the idle command blocks. Unless you want them all on different threads (bad idea).
A Store event listens for notifications issued by your backend store:
http://java.sun.com/products/javamail/javadocs/javax/mail/event/StoreEvent.html
But in my experience the java mail docs are so thin in places, that the best way of finding out what is going on, is to debug through the process yourself.
This is a great allround resource as well; the JavaMail FAQ :
http://www.oracle.com/technetwork/java/faq-135477.html

Is there a Windows utility that can be used to receive mails via POP?

Is there a utility (like Blat) that can be used to receive mail, perhaps via POP?
I need something that's
A Windows Executable (no DLLs)
Simple to use
Doesn't need to be installed
I'm trying to make a simple email interface for my program. Any ideas would be appreciated.
While on the subject, is there a good free email provider that doesn't demand secure logins?
http://www.codeode.com/popclient/index.html

Is there a Perl module to monitor an email queue?

I'm working on an issue tracking system and would like the application to handle email replies. That is, I would like a script that can monitor an email queue and perform some action based on the email contents. It should then be able to delete the email, etc.
I currently use MIME::Lite to send email, and I can handle writing the script etc. (read: I'm not new to Perl). However, I have no idea what modules are good for doing this particular task. I'd like to get started on this as quickly as possible so I hope to narrow my search space for possible modules.
In case you need to know, the application will be running on a standard linux, Perl, MySQL stack with Exchange as the mail server.
Can anyone suggest a Perl module to help me out? Any tutorials or best practices related to this would also be helpful.
Thanks!
Do you have access to the Exchange server via IMAP or WebDAV?
For IMAP:
Mail::IMAPClient
IMAP::Client
Net::IMAP::Client
Email::Folder::IMAP
For WebDAV:
Email::Folder::Exchange
POP3 would also be an option if it's enabled on the server. IMAP is probably the way to go if you've got it.
I've done something similar using Mail::POP3Client
The Perl Email Project # http://emailproject.perl.org/mediawiki/index.php/Main_Page has recommendations and other information on the mail oriented modules for perl.

Accessing an Exchange Server without Outlook

Is there a method of accessing an Exchange server that does not have IMAP or POP3 enabled without Outlook?
It does not appear that Outlook Express supports Exchange (only IMAP and POP3).
The only way I can think of is if the Exchange server has Outlook Web Access (OWA) turned on. You can test this by trying the server name in your browser like so: http://server/exchange.
If you mean programmatically then the recommended way is to use WebDAV (which is what OWA uses).
#Jon I think the method you linked to uses IMAP.
Edit: #Pat: SimpleMAPI is the protocol that allows applications such as Word etc to talk to your email client, not your email client to the server - ExtendedMAPI is needed for that, which Thunderbird doesn't support.
The Outlook Web Access URL is more likely http(s)://server/owa
Exchange 2007 is SSL only by default.
There's also Exchange Web Services in newer versions of Exchange.
If you need to use Outlook Express and talk to an Exchange server which doesn't support IMAP/POP3, you're stuck, sadly.
I know thunderbird and eudora have support for SimpleMAPI so they can talk to an exchange server but the command set of what they can do is rather basic (you need Extended MAPI support for the whole set)
afaik Outlook is the only windows client with full support for Extended MAPI.
You can use Thunderbird to access Exchange e-mail and contact lists.
Edit - Oops, this uses IMAP, didn't answer the question.
If you're willing to consider a major change, you could look at Snow Leopard's support of Exchange through iCal and Mail programs. I find it isn't as robust as outlook (expected), but it gives me better off-site performance as the RPC protocol isn't active through TCP/IP connections on our server. I find that the RPC via VPN or HTTPs to both be immensely slow. Mac Exchange to the rescue, unless I'm on my windows box, then it's Outlook Web Access (aka "owa" aka webmail).
Yes! You can use ExQuilla plugin for Linux (How to guide) to access Exchange 2007/2010 email and address book. Original reply