Hi,
Sometimes, the function GetMessageByUID does not always find the attachments.
Here is my code:
var eml = imap.GetMessageByUID(uid);
IMail email = new MailBuilder().CreateFromEml(eml);
MimeData attachment = null;
foreach (MimeData attachmentTemp in email.Attachments)
{
if (attachmentTemp is IMailContainer)
{
attachment = attachmentTemp;
break;
}
}
Sometimes, "email.attachments" return an object of type "MimeRfc822" and other times, it return an object "MimeRfc822Headers"
If we try to get the attachment back from the object "MimeRfc822Headers", we only get an empty mail.
So here my question, why does sometimes GetMessageByUID return the attachments and the other time it does not.
Sorry for bad english.