Reputation: 225
Using Microsoft Graph Client Sdk is it possible to alter or modify the reply subject.
Currently I am only able to reply using a string which becomes the content body of the reply message.
Upvotes: 1
Views: 538
Reputation: 596
Yes, you will have to do this in three parts:
Here's a sample of how to do this in the SDK:
var replyMessage = await graphClient.Me.Messages[message.Id].CreateReply().Request().PostAsync();
var newReplyBody = new ItemBody();
newReplyBody.Content = "Response" + replyMessage.Body.Content;
replyMessage.Body = newReplyBody;
replyMessage.Subject = "New Subject";
await graphClient.Me.Messages[replyMessage.Id].Request().UpdateAsync(replyMessage);
await graphClient.Me.Messages[replyMessage.Id].Send().Request().PostAsync();
Upvotes: 1