Given the code snippet below the imapMessageInfo.Headers.Count() is always 0 for me. This is with 21.7.0. Should the Headers collection be populated with ListMessages? And, if not, how do I get all the headers for the messages in a folder?
ImapClient imapClient = new ImapClient();
imapClient.SelectFolder(imapClient.MailboxInfo.Inbox.Name);
foreach (ImapMessageInfo imapMessageInfo in imapClient.ListMessages())
{
Console.WriteLine(imapMessageInfo.Headers.Count());
}
@bpm-1,
I reproduced the problem with the empty Headers collection on my side and I see the documentation and API reference do not clarify this. I logged the issue with ID EMAILNET-40347 in our tracking system. Our development team will investigate this case. I will inform you of any progress.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.