This project is read-only.

message id returns null



I am trying to get message id but its value return is null.

var client = new ImapClient("", 143, false);
        if (client.Connect())
            if (client.Login("sername, password)))

                var inbox = client.Folders.Inbox;
                var message = inbox.Search();
                foreach(var msg in message)
Please help.


jevachka wrote Nov 1, 2016 at 8:23 AM

I'm having the same issue. I'm trying to read emails from
MessageId property return null and there is no "Message-ID" header in message.Headers.
How can i fix this problem?

fontan wrote Mar 7, 2017 at 1:39 PM

have you tried adding
   client.Behavior.RequestedHeaders = null;
into you code? ImapX now gets only few basic headers by default (I would suggest MessageID to be among them but it is not).