it is possible get email list using imapX?

7.3k Views Asked by At

I downloaded the ImapX library and I need know it is possible get email list using imapx? if not, what is the best quick and fast way to do it? the google API looks like a bit confusing. and I need it to winforms application.

1

There are 1 best solutions below

1
On BEST ANSWER

The sample provided on the ImapX site is pretty clear :

var client = new ImapX.ImapClient("imap.gmail.com", 993, true);
client.Connection();
client.LogIn(userName, userPassword);
var messages = client.Folders["INBOX"].Search("ALL", true);

So, the answer to your question is: Yes!

I haven't used ImapX, so I cannot confirm that this code is working. Personnaly, I prefer MailSystem.NET which seems to be more complete (it's not limited to IMAP) but lacks documentation.