Library is not able to update an EmailMessage Body
The following code will work on C# to change the body of an email
ExchangeService ewsClient; // A properly authenticated EWS service object tied to a mailbox
string emailID; // A valid email ID for that mailbox
var message = EmailMessage.Bind(ewsClient, new ItemId(emailID));
message.Body = new MessageBody(0, "<p>This is the replaced body</p>");
message.Update(ConflictResolutionMode.AlwaysOverwrite);
In the other hand, it's equivalent on javascrypt throws Exception: The request failed schema validation.
const ewsClient: ExchangeService; // A properly authenticated EWS service object tied to a mailbox
const emailID: string; // A valid email ID for that mailbox
const message = await EmailMessage.Bind(ewsClient, new ItemId(emailID));
message.Body = new MessageBody(0,'<p>This is the replaced body</p>');
await message.Update(ConflictResolutionMode.AlwaysOverwrite);
Library is not able to update an EmailMessage Body
The following code will work on C# to change the body of an email
In the other hand, it's equivalent on javascrypt throws
Exception: The request failed schema validation.