Search code examples
apipreviewoffice365

How do I add a custom mail header using the Office365 Preview API


I can't find anything in the preview API or the Microsoft.Office365.Exchange namespace to let me create a custom header or get the existing headers. Here's my code create the email and the recipients.

//Create the new Message with the Office365 API and save it to the Drafts folder
var client = await EnsureClientCreated();
var o365Message = new Microsoft.Office365.Exchange.Message();            
string subject = "Test subject";
o365Message.Subject = subject;
o365Message.Body = new ItemBody() { Content = "Test", ContentType = BodyType.Text };
messageModel.Subject = subject;
var recip = new Recipient();
recip.Address = "[email protected]";
o365Message.ToRecipients.Add(recip);
await client.Me.Drafts.Messages.AddMessageAsync(o365Message, false);

Thx,


Solution

  • This isn't available right now from the service. I see nothing about mail headers in the metadata document. Please use UserVoice to request this feature.