Thanks for your reply.
I have also observed this issue and have logged it under id: EMAILNET-34932 in our bug tracking system for further investigation by the product team. I shall write here as soon as some feedback is received in this regard. Following sample code is used to re-produce the scenario:
ImapClient client = new ImapClient(“[imap.gmail.com](http://imap.gmail.com/)”, 993, “userid”, “password”); client.SecurityOptions = SecurityOptions.SSLImplicit; client.SelectFolder("Inbox"); ImapQueryBuilder builder = new ImapQueryBuilder(); MailQuery qry = builder.MessageId.Equals("<firstname.lastname@example.org>"); ImapMessageInfoCollection messages = client.ListMessages(qry);//EXCEPTION RAISED HERE
You may please traverse the entire ImapMessageInfoCollection to compare the required MessageId for retrieving the target message. Currently, there is no other method available for fetching the message using MessageId.
We have further investigated this issue and found that the IMAP protocol doesn’t support searching messages by MessageId. That is why Aspose.Email API can’t provide searching for messages using the message id. You can find a list of allowed search keys here.