我正在使用EWS與多個與會者創建約會。我需要添加本地(在我們的Exchange域)和外部參與者。它適用於本地用戶,但外部用戶未收到邀請,但該電子郵件顯示在Outlook中的約會中。這是在Exchange中的設置還是我做錯了什麼?與域外的RequiredAttendees創建約會
當我在Outlook中打開約會時,表示邀請沒有發送。如果我然後點擊在Outlook中發送,則發送邀請。
這是我的代碼:
ExchangeService _service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
_service.Credentials = new WebCredentials(username, password);
_service.UseDefaultCredentials = false;
_service.Url = new Uri(exchangeClientConfig.ExchangeServiceUrl);
_service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, email);
Appointment appointment = new Appointment(_service);
appointment.Subject = subject;
appointment.Body = new MessageBody(BodyType.Text, text);
appointment.Start = dateTimeStart;
appointment.End = dateTimeStart.AddHours(durationClock.Hour).AddMinutes(durationClock.Minut);
appointment.RequiredAttendees.Add(to);
appointment = (Appointment)LoadExtendedProperties(appointment, recnum);
appointment.Save(WellKnownFolderName.Calendar, SendInvitationsMode.SendOnlyToAll);
您能向我們展示用於添加與會者到預約的代碼嗎? – FreeRangeEggs