Empty message with IMAP when switching from 19.10 to 19.11

When I update to Apsose.Email 19.11 (.NET) from 19.10 the MailMessage object (received by ImapClient.FetchMessage) contains no informations. The object is not null but all relevant fields like Body or Attachments are empty. Also when I choose saveMessage I get a 0 bytes file.
For testing I used the same emails from Gmail and Strato by IMAP.

When I receive the same emails with version 19.10. everything is working. Also when I receive mails with POP3 and version 19.11. everything is working.

Visual Studio Debugger screenshots:

aspose_email_19.10.0.0.PNG (36.7 KB)
aspose_email_19.11.0.0.PNG (32.3 KB)


I have observed the issue shared by you and request you to please share the source MSG file or sample code with IMAP credentials reproducing the issue on your end. Please share the requested information that is reproducing issue on your end so that we may try to reproduce and log the issue in our issue tracking system.

Attachment: Sample code to get emails with IMAP from Gmail. There should be at least 2 mails with attachments in that Gmail account.

aspose_imap_sample.zip (447 Bytes)


Thank you for providing the information. An issue with ID EMAILNET-39682 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Any update on this?


Can you please try using latest Aspose.Email for .NET 20.9 on your end and if there is still an issue please share the feedback with us.

We found a workaround/bug?.

The issue is that calling imapClient.FetchMessageAsync without first calling imapClient.ListMessagesAsync will result in an empty/null MailMessage, so the workaround is to call imapClient.ListMessagesAsync first.

When waiting for new emails using the IMAP IDLE command (imapClient.StartMonitoringAsync), the new mail notification contains the UniqueId for each new email, so there should be no need to call ListMessagesAsync since we already have the UniqueIds. This needs to be fixed or documented!

example code for working and non-working scenarios can be found here: [https://stackoverflow.com/questions/64143675/aspose-email-clients-imap-imapclient-fetchmessage-always-return-an-empty-null-ma ](https://stackoverflow.com/questions/64143675/aspose-email-clients-imap-imapclient-fetchmessage-always-return-an-empty-null-ma)


Thank you for highlighting the example. I have linked that in our issue tracking system for further review and making that part of documentation too after that.