Question

I have an EmailMessage item saved in Draft folder. I need to open an editing form of it in browser, but cannot found id that is used by web client. In documentation there is such property, but it fails with Microsoft Exchange Server 2007. What is alternative? Any help is appreciated.

Was it helpful?

Solution

I've found.

ExchangeService service = new ExchangeService();
EmailMessage message = EmailMessage.Bind(new ItemId("someId"));
var alternateId = new AlternateId();
alternateId.UniqueId = message.Id.UniqueId;
alternateId.Mailbox = "somemailbox";
alternateId.Format = IdFormat.EwsId;

var convertedId = service.ConverId(alternateId, Format.OwaId) as AlternateId;

And convertedId.UniqueId is what I need;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top