我无法在预览API或Microsoft.Office365.Exchange命名空间中找到任何内容,以便让我创建自定义标头或获取现有标头。这是我的代码创建电子邮件和收件人。
//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 = "test@test.com";
o365Message.ToRecipients.Add(recip);
await client.Me.Drafts.Messages.AddMessageAsync(o365Message, false);
THX,