Send invitation just to attendees on which I haven't got access to
-
Tuesday, November 13, 2012 1:56 PM
Hi together,
I try to create appointments for several attendees.
I discovered that I need access to the users mailboxes or I can use appointment.save method with the SendInvitationMode.SendToAllAndSaveCopy parameter.
If I use this approach every attendee will get an invitation email.
Is it possible to do this just for attendees on which I haven't got access to? Or is there a different way for my goal to create appointments for different attendees with and without access to their calendar.
Thank you in advance.
my current solution:
var exService = getService (_exchangeEmail, _exchangeUser, _exchangePWD, _exchangeDomain, currentUserId); if (exService != null) { //var newFolder = new Ex.Folder(exService); /* var myMailbox = new Ex.Mailbox(item); var newFolder = new Ex.Folder(exService); newFolder.Save(Ex.WellKnownFolderName.Calendar); var CalendarFolder = new Ex.FolderId(Ex.WellKnownFolderName.Calendar, myMailbox); */ var accountbody = "<br><b>" + _accountDesc + accName + "</b>" var contactbody = "<br><b>" + _contactDesc + conName + "</b>"; var descbody = "<br><br>" + desc + "<br>"; var descLink = "<br>Link: <u>" + _crmServiceURL + "</u>"; var mailbody = accountbody + contactbody + descbody + "<p></p>"; var appointment = new Ex.Appointment(exService) { Subject = subjectPrefix + subject, Body = "<span style='font-family : " + "arial; font-size: 8pt '>" + @mailbody + "</span>", Start = start, End = end, Location = location }; reqAtt.ForEach(req => appointment.RequiredAttendees.Add(req)); optAtt.ForEach(opt => appointment.OptionalAttendees.Add(opt)); appointment.LegacyFreeBusyStatus = Ex.LegacyFreeBusyStatus.Busy; appointment.NetShowUrl = activityid.ToString(); var myList = new List<string>() { "Purple Category", "Lila Kategorie" }; appointment.Categories = new Ex.StringList(myList); try { appointment.Save(Ex.SendInvitationsMode.SendToAllAndSaveCopy); }
- Edited by Tim F. Mischkin Tuesday, November 13, 2012 1:58 PM
All Replies
-
Wednesday, November 14, 2012 5:05 AM
If you save the appointment first first before adding any attendees you can the add the attendees after and call the update method that will allow you to pass in the SendInvitationsOrCancellationsMode.SendToChangedAndSaveCopy enum http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.sendinvitationsorcancellationsmode(v=exchg.80).aspx. If you use this the invites will only be sent to the attendees you change. For attendees you don't want to receive an invite use a separate update and pass in SendInvitationsOrCancellationsMode.SendToNone.
Cheers
Glen -
Monday, November 26, 2012 2:44 PM
Thx Glen, but this isn't exactly what I expected.
If I save an appointment object with SendInvitationsMode.SendToNone this appointment doesn't appear in the Outlook calendar of the required attendee. Is there any way to store it for some users without sending an Invitation? Or to send just an Invitation as info without the possibility to decline the appointment?Should I have to use the Mailbox Object for this behavior? -
Tuesday, November 27, 2012 5:38 AM
>> If I save an appointment object with SendInvitationsMode.SendToNone this appointment doesn't appear in the Outlook calendar of the required attendee
That's to be expected saving the appointment only saves it to the organizers calendar, for an appointment to appear in a attendees calendar it must be accepted by the attendee.
>Or to send just an Invitation as info without the possibility to decline the appointment?
No you can't send a meeting that can't be declined if you have access to the attendees mailbox you could connect as to that users mailbox and accept the meeting for them but you still need to generate the invite.
Cheers
Glen- Marked As Answer by Tim F. Mischkin Tuesday, November 27, 2012 7:46 AM
-
Tuesday, November 27, 2012 7:46 AM
Thank you very much Glen,
I try to connect to the users Mailbox, search for the appointment and acceppt it. Works well.
In my opinion the best solution for us:-)

