There is no IMAP support in current versions of .NET and I have not heard about any plans to add such support to the framework. You have to try one of third party components.
You may check our Rebex Secure Mail.
Following code shows how to download messages from the Inbox
folder:
// create client, connect and log in
Imap client = new Imap();
client.Connect("imap.example.org");
client.Login("username", "password");
// select folder
client.SelectFolder("Inbox");
// get message list
ImapMessageCollection list = client.GetMessageList(ImapListFields.Fast);
if (list.Count == 0)
{
Console.WriteLine("There are no messages in the mailbox.");
}
else
{
// download the first message
MailMessage message = client.GetMailMessage(list[0].SequenceNumber);
...
}
Trial can be downloaded from www.rebex.net/secure-mail.net/
You may also enjoy Rebex Q&A forum which runs on similar engine as this site.