Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using(Imap imap = new Imap())
- {
- imap.Connect("imapServer");
- imap.Login("user", "password");
- imap.SelectInbox();
- List<long> uids = imap.SearchFlag(Flag.Unseen);
- foreach (long uid in uids)
- {
- string eml = imap.GetMessageByUID(uid);
- IMail message = new MailBuilder()
- .CreateFromEml(eml);
- Console.WriteLine(message.Subject);
- }
- imap.Close(true);
- }
Add Comment
Please, Sign In to add comment