code_junkie

What .NET Mime Parsing libraries are available?

Nov 10th, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. using(Imap imap = new Imap())
  2. {
  3. imap.Connect("imapServer");
  4. imap.Login("user", "password");
  5.  
  6. imap.SelectInbox();
  7. List<long> uids = imap.SearchFlag(Flag.Unseen);
  8.  
  9. foreach (long uid in uids)
  10. {
  11. string eml = imap.GetMessageByUID(uid);
  12. IMail message = new MailBuilder()
  13. .CreateFromEml(eml);
  14.  
  15. Console.WriteLine(message.Subject);
  16. }
  17. imap.Close(true);
  18. }
Add Comment
Please, Sign In to add comment