I'm using MailKit to get a list of full IMessageSummaries like this:
var allMessages = remoteFolder.Fetch(remoteIndexList, MessageSummaryItems.Full | MessageSummaryItems.Flags | MessageSummaryItems.UniqueId | MessageSummaryItems.BodyStructure);
I'm not interested in any optimizations like downloading parts of the IMessageSummary etc., I just want the whole data, as fast as I can get it.
But using the above approach, I can't then read properly the HTML in the message's body, for example using HtmlPreviewVisitor
because the Body
property of IMessageSummary
is a BodyPartBasic
. I need the whole MimeMessage
, obviously.
The problem is that if I want to get multiple MimeMessages
, I can't, I can only get one at a time using ImapClient.GetMessage(int index, ...)
method.
Is there a way to extract all of the parts from the original MimeMessage
that was used to create IMessageSummary
and use them with HtmlPreviewVisitor
without having to download each full MimeMessage
again?