I'm developing an application that tracks exchange email messages in our company. We where able to get info out from the tracking log, but in the log -by design- there is no subject or body message. So the next step for us was using EWS to get the message detail when needed. The question is that in the tracking log we find to IDs :
MessageId in format "F533E7F015A2E24F8D8ABFE2587117C601EDF245@blstex02.subdomain.domain.com"
and
InternalMessageId in format "5840818"
If in EWS we use this id to find the message by id we always get an "Id is malformed." exception. Here is the code we use:
public static EmailMessage GetEmailById(string uNameToImpersonate, string StringItemId)
{
return EmailMessage.Bind(GetService(uNameToImpersonate), new ItemId(StringItemId));
}
I'm a newbie to EWS so maybe I'm missing something really easy... Thanks for your help