Hello,
How do I parse the Message-ID from the headers?
I have the following:
static void Main(string[] args)
{
Imap imap = new Imap();
imap.Connect("imap.gmail.com", 993, null, ImapSecurity.Implicit);
imap.Login(username, password);
imap.SelectFolder("Inbox");
ImapMessageCollection collection = imap.GetMessageList(ImapListFields.FullHeaders);
foreach (ImapMessageInfo msg in collection)
{
Console.WriteLine(msg.MessageId.Id);
}
Console.Read();
}
but I am having a NullReferenceException. How do I go about it, the correct way? Thanks!