从约会电子邮件正文中删除生成的数据

时间:2019-06-28 10:26:47

标签: c# exchangewebservices

我创建约会(使用Microsoft.Exchange.WebServices.Data),如下所示:

Appointment appointment = new Appointment(this.ExchangeService)
{
    StartTimeZone = TimeZoneInfo.Local,
    EndTimeZone = TimeZoneInfo.Local,
    Subject = "Test subject",
    Body = "Test body",
    Start = new DateTime (2019, 7, 1, 10, 0 ,0),
    End = new DateTime (2019, 7, 1, 11, 0, 0),
    Location = "Test location",
};
appointment.Save(SendInvitationsMode.SendToNone);

// Some code
// ...

appointment.RequiredAttendees.Add("someSmtpAddress@mail.com");

并发送:

appointment.Update(ConflictResolutionMode.AutoResolve, SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy);

一切正常,与会人员会收到带有邀请的电子邮件,但消息正文包含其他信息:

enter image description here

如果我通过Outlook 2016创建约会,则正文消息之前不会附加任何数据。

在这种情况下,我希望邮件仅包含“测试正文”。如何从电子邮件正文中排除生成的“何时何地”行?

0 个答案:

没有答案