Hi,
I am trying to modify Sender (or From address) of public folder items. Though Sender and From properties are writable according to this document:
https://msdn.microsoft.com/en-us/library/office/dn600367(v=exchg.150).aspx
but EWS API is throwing error when I am trying to modify these properties.
When I am trying to modify 'From' field of email item, i m getting this error:
Exception: Message is not draft.
When I am trying to modify 'Sender' field of email item, i m getting this error:
Exception: This property can't be updated.
I also tested this with email items in Inbox folder of a mailbox, and faced same errors.
This is piece of code, I am using
foreach (Item item in findResults.Items) { EmailMessage msg = item as EmailMessage; msg.Sender = new EmailAddress("jt@mydomain.onmicrosoft.com"); //Also tried // msg.From= new EmailAddress("jt@mydomain.onmicrosoft.com"); msg.Update(ConflictResolutionMode.AutoResolve); }
I am looking to find out some substitute method for this. Can anyone help.
Thanks in anticipation.
Regards, David Johnson