Using EWS Managed API 2.1 on Exchange 2010, I'm creating a new draft message in a Public folder, and calling the Save method:
var newMessage = new EmailMessage(exchangeService); newMessage.Save(myFolder);
The message is created, blank. I can now edit it through my application, setting the Subject, To and Body, and then call Update(). This works fine for most properties, except for the From field - it stays blank, no matter what I change it to. However, if I set it before the initial Save() call, it will be saved properly.
Enabling full tracing for EWS shows that the UpdateItem message contains the new From field, and the UpdateItemResponse contains a SUCCESS code without any problems - but no changes are persisted. The same goes when I set ConflictResolutionMode to AlwaysOverwrite.
It looks like the From field can only be set when IsNew is true - when an item is still only in memory and hasn't been created in the public folder.
Is this true? Is there a way to change the From field of an already-saved item, which is still a draft (IsDraft=true)?