I'm working on synchronisation of appointments , tasks from our application to Exchange and back .
The EWS is showing appointments on resources ( required attendees , optional attendees ) calendar only when SendInvitationsMode enum passed as either SendInvitationsMode.SendToAllAndSaveCopy
or SendInvitationsMode.SendOnlyToAll
.
If we set SendInvitationsMode enum to SendInvitationsMode. SendToNone
then it's saving appointment only on Organizer calendar.
Sample code
Appointment meeting1 = new Appointment(service);
ImpersonatedUserId impersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "organizer email");
service.ImpersonatedUserId = impersonatedUserId;
meeting1.Subject = "Checking responses";
meeting1.Body = "The purpose of this meeting is to check status.";
meeting1.Start = new DateTime(2017, 4,14, 12, 0, 0);
meeting1.End = meeting1.Start.AddHours(2);
meeting1.Location = "Conf Room";
Attendee attendee = new Attendee();
attendee.Address = "attendee email address";
attendee.Name = "name";
meeting1.RequiredAttendees.Add(attendee);
meeting1.Save(SendInvitationsMode.SendToNone);
Is there a way to insert appointments where all attendees can see in their respective calendars with out email notifications ? It doesn't make sense to send notification for past appointments .