EWS マネージ API を使用して招待付きの添付ファイルを送信する際に問題が発生しています。予定の出席者は、予定に追加された添付ファイルを受信しませんが、添付ファイルは予定を作成した人のカレンダーに表示されます。
ここに私のコードスニペットがあります:
try
{
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"));
service.Credentials = new WebCredentials("calendar_user", "password1", "acme");
service.Url = new Uri("https://acme.com/EWS/Exchange.asmx");
Appointment appointment = new Appointment(service);
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "tin.tin@acme.com");
String UID = "D09F3FF6-1461-414C-89E8-C05BC3B66A4A";
appointment.ICalUid = UID;
appointment.Subject = "Test Subject";
appointment.Body = "Test Content.";
appointment.Start = new DateTime(2012, 07, 11, 17, 00, 0);
appointment.End = appointment.Start.AddMinutes(30);
FileAttachment attachment = appointment.Attachments.AddFileAttachment(@"C:\Users\tintin\Documents\Test.xlsx");
attachment.IsInline = false;
appointment.RequiredAttendees.Add("tin.tin@acme.com");
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);
}
catch (Exception ex)
{
}