Search code examples
djangoicalendar

How to create generic ics file which works for gmail, yahoo, outlook and other clients, while send from programming application?


I have web application based on django framework. Application creates ICS file by cal python package. We are sending this ICS to differnt clients email ID(gmail, outlook, yahoo etc)

So I am facing problem in below Scenarios

Scenario - 1. Create Event 2. Update all Occurrences or update particular occurrence of event 3. Cancel all Occurrences or cancel particular occurrence of event.

Create - ICS file is working with Gmail and outlook but not with yahoo when i send this from web application, and if I send the same file from other clients like gmail it creates event in yahoo also.

Update - Same scenario is applicable for update case. Not working with yahoo.

Cancel - In cancel case ICS is not working for any client. I have few point in Cancel file like - METHOD : CANCEL UID : Same as sent in create and update case. Above two are mandatory fields

STATUS, SEQUENCE, RRULE - Is this required? If SEQUENCE is required then what will be the value of this variable.

Please give your suggestions.


Solution

  • Summary of Answers:

    1. add file header with contents-type = text/calendar.
    2. Validate all ics files and fix the errors such blank lines, line endings etc
    3. For the final cancel of a single instance within a recurring series not working in Yahoo, via email it sounds like Hemendra is issuing a "STATUS:CANCELLED" with the RECURRENCE-ID for the date to be removed. This maybe working with some applications however some may expect the formal way to remove an instance of a date in a series, which is to reissue the event series (RRULE) with the sequence number updated and including the date one wants to exclude as an EXDATE. "The EXDATE property is used to remove instances from a recurrence set defined by an RRULE." https://devguide.calconnect.org/Recurrences/

    See also