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

Free Support Forum - aspose.com

IMAP: AsposeArgumentException: uniqueId should not be null or empty

Hi,

the following exception is thrown when trying to download a message via IMAP:

AsposeArgumentException: uniqueId should not be null or empty.
at Aspose.Email.Clients.Imap.ImapClient.#=z_xhJ015C015B28JHkQ==(String #=zUbEKB00=, String #=zCfUL92A=)
at Aspose.Email.Clients.Imap.ImapClient.#=zryhJqA6E7zYM(IConnection #=zonhtzTM=, String #=zZoBTPfY=, AsyncCallback #=zPJDl$MQ=, Object #=z3r3LHIk=)
at Aspose.Email.Clients.Imap.ImapClient.#=zryhJqA6E7zYM(String #=zZoBTPfY=, AsyncCallback #=zPJDl$MQ=, Object #=z3r3LHIk=)
at Aspose.Email.Clients.Imap.ImapClient.FetchMessage(String uniqueId)

I use the following c# method to download the message:

MailMessage CurrentMessage = Client.FetchMessage(CurrentItem.UniqueId);

My issue is now that I must find out which message causes this exception and why. Troubleshooting is complicated by the fact that the message that we try to download is not visible in the mail folder of the customer’s mail account. We only know after the download fails that the unique id and the subject of the message are empty.

My questions:

  1. What could cause this exception? A “hidden” file?
  2. How can we improve the informations of the exception?
  3. I have a slight recollection of a debug aspose.email.dll. Where can I find it?

@pfa,
Thank you for posting the query. Obviously, this exception is thrown because the UniqueId property is null. Therefore, the message cannot be fetched. You should find out why this property is null.