message-id Questions - Rebex Q&A Forum (C#, VB.NET) most recent 30 from http://forum.rebex.net 2010-09-08T14:39:33Z http://forum.rebex.net/feeds/tag/message-id http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://forum.rebex.net/questions/96/retrieving-the-message-id Retrieving the Message-ID Wakatake 2010-03-07T14:11:32Z 2010-08-27T01:23:57Z <p>Hello,</p> <p>How do I parse the Message-ID from the headers?</p> <p>I have the following:</p> <pre><code>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(); } </code></pre> <p>but I am having a NullReferenceException. How do I go about it, the correct way? Thanks!</p>