We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IMAP - Get mail by message key doesn't work for the first time


I’m trying to do the following scenario:

  1. Connect to IMAP email server.
  2. Get message key by “subject”. (I have only one mail with that subject)
  3. Now, try to get “from” field by message key.

On the first time I run this scenario - I got 0 results for step no. 3.
On the second time - I got the result, Why it works only on the second time?

Both Exchange and Pop3 work well.
I’m using Aspose.Email version


Ok. I think I understand why it’s doesn’t work…
Is mail flag changed to be ‘read’ after calling ListMessages method?
If so, that’s explain the bug.



I have observed the issue shared and request you to please first try using Aspose.Email 20.2 on your end first. In case the issue still reproduced the please share the working sample project along with source file or test account credentials that we may use on our end to help you out.