Programmatically creating Outlook meeting request has been a hot topic for me over the past few weeks. I found myself in a scenario that required me to send a meeting request from a user and was using the System.Net.Mail namespace to do the job.While creating the meeting request, a limitation surfaced as result of the approach I was using. I used the code from the blog below as a foundation to start with.
Although the vCalendar format includes ‘Request’ as part of it’s schema, the ‘flow’ of messages is not the same as if an Outlook meeting request was created directly from the client application. The meeting request will be sent to the recipient with the organizer’s account in the ‘From’ field, but the organizer will not have it on their Outlook calendar.
Will provide the code needed to send Outlook meeting request using the System.Net.Mail namespace. The main drawback of programmatically creating Outlook meeting requests using this technique is the lack of options under Accept/Decline.
After doing some research, I discovered when the organizer creates the request from their Outlook client, a UID (unique ID) is created.The meeting request that ends up on the recipients calendar references that same UID as the originator’s.This results in the additional options under Accept, Tentative, and Decline.
When creating a meeting request from code however, the UID object is instantiated at runtime and does not get associated with the originator at all.Therefore, Accepting/Denying with any follow up message is not possible.
If both the originator and recipient(s) happen to be using the same Exchange server (2007 or 2010), a solution to the above problem can be found via the Exchange Web Services Managed API. Here is a link that will get you started.