Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iCalendar does not create an event for organizer

I’m trying to create an event in my Microsoft Outlook calendar by using iCalendar standard. I’ve sent an email with content type “text/calendar” to my Exchange mailbox from .NET application. It arrives to Outlook as an meeting request. Everything looks good, till the moment when I click the received meeting request, Outlook displays it as an empty calendar view with the text: “Meeting cannot be found in the calendar”. I don’t understand why – I wanted to create an event and it is trying to find some existing?

If I send exactly the same email to whoever participant of the meeting except the organizer, it creates an event in their calendars and everything seems to be ok. I’ve found that it is caused by the “ORGANIZER” property. If it is set to organizer’s email (my email) and I send meeting request to myself, an event is not created with the information “Meeting cannot be found in the calendar”.

So the question is why it doesn’t create an event for organizer? Organizer must have that event created to be notified by other participants if they have accepted or cancelled the meeting.

Here is the iCalendar:

BEGIN:VCALENDAR
PRODID:-//Company//Product 3.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20130225T200000Z
DTEND:20130225T203000Z
DTSTAMP:20130225T143039Z
ORGANIZER;CN="John Doe":mailto:[email protected]
UID:[email protected]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CN="John Smith"
 ;X-NUM-GUESTS=0:mailto:[email protected]
CLASS:PUBLIC
CREATED:20130225T143039Z
DESCRIPTION:
LAST-MODIFIED:20130225T143039Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Booking test
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
like image 352
gregjer Avatar asked Feb 26 '13 08:02

gregjer


People also ask

How do I set up an iCalendar invite in Outlook?

On your calendar, click the appointment. On the Appointment tab, in the Actions group, click the down arrow on the Forward command. Click Forward as iCalendar. A new message window appears and an iCalendar is attached.


2 Answers

Let’s say that organizer want to create an meeting for 2 attendees. He fills in a form in the booking system. The booking system sends email containing iCalendar standard to himself and to 2 meeting attendees.

This scenario doesn’t work.

It is not possible to create an event (cancellable meeting object) in the calendar of the organizer. The client thinks that email containing iCalendar format is just notification for attendee of the meeting already created in the organizer calendar. If such an email arrives to organizer’s mailbox, client app doesn’t create an event in the organizer’s calendar. It assumes that an event was created by organizer himself. E.g.: Outlook tells you in that case that “Meeting cannot be found in the calendar”.

If you ask Microsoft support about it, they only tell you that they does not support open standards: http://support.microsoft.com/kb/2269506

Working solution to this problem is to use platform services (Exchange Web Services or Google Calendar API) to create an event in the organizer’s calendar. Forget iCalendar standard. The services can be configured for sending notifications to attendees automatically. So it is enough to pass “SendInvitationsMode.SendToAllAndSaveCopy” if you’re using EWS:

Appointment appointment = new Appointment(service);
appointment.Subject = "Status Meeting";
appointment.Body = "The purpose of this meeting is to discuss status.";
appointment.Start = new DateTime(2014, 3, 1, 9, 0, 0);
appointment.End = appointment.Start.AddHours(2);
appointment.Location = "Conf Room";
appointment.RequiredAttendees.Add("[email protected]");
appointment.RequiredAttendees.Add("[email protected]");
appointment.OptionalAttendees.Add("[email protected]");  
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

or set “sendNotifications” parameter to true in case of Google Calendar API.

You don’t need to send an email to every particular attendee.

like image 62
gregjer Avatar answered Oct 02 '22 15:10

gregjer


This is a bit of an old issue, but i think it is caused from using METHOD:REQUEST This marks that the ical should be updated, not that it is a new item. Instead, use METHOD:PUBLISH

I can confirm that this works with DDay.iCal and Outlook Calendars.

like image 29
Bart Avatar answered Oct 02 '22 16:10

Bart