Uniquely identify record in Exchange using EWS

How can I uniquely identify a email in Exchange using Aspose.Email.


We are currently working on UniqueURI from ExchangeMessageInfo to identify a unique message in Exchange but that does not seems to work. We were able to find multiple messages with same uniqueURI.

Hi,

Each message in the Inbox, Delete or Sent folder is accessible by its UniqueUri that you can use to download the message. The Message ID is also unique and preferably used for keeping track of messages or contents. Please let us know if we can be of any additional help to you in this regard.

P.S. You may refer to this link for any further information in this regard.

Hi Muhammad,


Thanks for your quick response.

Per our current flow, We read emails from Exchange using EWS and store in the database (With UniqueKey of UniqueUri). Unfortunately I was able to find many emails with the same Uri which make me wounder that it is not unique :(.

Should we be using MessageId instead of UniqueUri?

-Akshay

Hi Akshay,


The UniqueUri is unique, but it is Base64 encoded. If you are using SQL server, the columns in SQL server are not case sensitive by default and you may be facing the same issue. Please check it at your end and let us know your feedback.