Reputation: 143
We have a web application that links to an exchange account and shows a list of all emails relating to that specific customer. When you click on an email in the list then that specific email opens in a new window in OWA.
We have just been upgraded to Exchange 2010 and I was pleased to find that all this code needed to be rewritten as WebDav has been deprecated! I've got everything working so far except opening the email. This is an example of the URL I get when opening one manually:
The problem is that I don't know how to get the last parameter (pspid). Does anyone know what this is? I'm starting to think it might be a security token for the session as opposed to part of the email. Does anyone know know the best way to generate a link like this?
Thanks
Upvotes: 1
Views: 1478
Reputation: 143
It took about a day to find the answer so I hope this helps someone. I needed to convert to the OwaId.
//Get the OWA Id
public String GetOutlookOwaId(EmailMessage message, ExchangeService ser)
{
AlternateId ewsId = new AlternateId(IdFormat.EwsId, message.Id.ToString(), "[email protected]");
AlternateIdBase owaId = ser.ConvertId(ewsId, IdFormat.OwaId);
return ((AlternateId)owaId).UniqueId;
}
Upvotes: 1