Search code examples
javascripticalendargcal

Do .ics files support being mailed? Are iCal features like RSVP supported when mailing them?


I'm working on a JavaScript-based app that sets up events between 1 organizer and 1 or more attendees per event. As it's public facing, organizers and attendees can be using pretty much any (major) calendar and/or email service.

I've determined that iCal (.ics) is the most widely supported format for sharing calendar events, so I've written code that emits valid .ics files (tested successfully against several online validators) but I'm confused about how to use the file. My expectation was:

  1. Generate .ics file with organizer and attendees (and an attendee entry for the organizer too with PARSTAT=ACCEPTED)
  2. Organizer sends the .ics file to the attendees (fyi: achieved by opening mail client in organizer's ui with pre-attached .ics file and preset to: field)
  3. The organizer's and attendees' respective mail/calendar service providers (e.g. gmail/gcal/outlook/exchange/etc) parse the .ics file and automatically add it to the users' calendars
  4. RSVP status is tracked by the calendar service providers

However, this usage does not seem to work with major providers for various reasons, e.g. for simplicity, let's assume both the organizer and the attendees use Gmail:

  1. Gmail seems to parse the file on both the organizer's side (.ics file sender) and the attendees' side (recipients), but only provides actions for the attendees to add the event to their calendar. No automated actions are provided for the organizer to add it to his/her calendar. I can confirm it is parsed on the organizer's side, as Gmail "knows" it's the organizer and deliberately doesn't offer the "add to calendar" action even though s/he is also an attendee (tested by modifying the organizer in the .ics file).

  2. The "Add to Calendar" action is offered to the attendee, and after it's added, RSVP actions are provided, but do not actually synchronize with the organizer (who at this point may or may not even have the event in his/her calendar depending on whether they added it manually).

I can guarantee the attendees are defined correctly (with PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE) and that the .ics files I'm generating are valid and their contents are correct.


  • Is my expected usage outlined above incorrect with regard to the .ics standard, or are the issues instead because of idiosyncrasies of the calendar/mail providers?

  • Is there another strategy to fulfill this use case using .ics files, or am I fundamentally misunderstanding the usage of .ics files - are they not meant to be mailed out as attachments? Do they not support RSVP unless you run your own CalDAV server?


Solution

  • With iMIP/iTIP, there is no concept of "injecting" an invitation into the organiser's calendar. The initial workflow is triggered by the organiser so the assumption is that the event is already in the organiser's calendar.

    For point 2) if the event is in the organiser's calendar and the reply are not processed, then there might be an issue with the way you are using the protocol. We would need the detail (both original REQUEST and REPLY) to help you debug this.

    A somehow related response at How can I create and email an invite for two unrelated recipients to a meeting between them and allow them to control further scheduling