Mail.dll supports both POP3 and IMAP for mail download and management:
https://www.limilabs.com/mail/samples#imap
using(Imap imap = new Imap())
{
imap.Connect("imap.server.com"); // or ConnectSSL for SSL
imap.UseBestLogin("user", "password");
imap.SelectInbox();
List<long> uids = imap.Search(Flag.Unseen);
foreach (long uid in uids)
{
IMail email = new MailBuilder()
.CreateFromEml(imap.GetMessageByUID(uid));
string subject = email.Subject);
}
imap.Close();
}
SMTP email protocol is used to send emails only.
It is not possible to retrieve emails using SMTP protocol.
Please note that this is not a limitation of Mail.dll, but of the SMTP protocol itself.