Search code examples
phpoutlookicalendar

Multiple events creating new calendar using ICS file


I would like to send multiple events using the .ics file. I've created a file with multiple events and it's just showing one event in my calendar instead of all.

Got some idea to remove X-MS-OLK-FORCEINSPECTOROPEN: TRUE from ICS file, I just followed same but then it's creating a new calendar always. I want to import it into the default calendar. Please help and correct me where I am doing wrong here. I have mentioned the code below. Thanks in advance.

------Meeting Booking----4e358482ef88327c611cde19d519ac3e
Content-Type: text/calendar;Content-Disposition: inline;filename="meeting.ics";method=REQUEST;
Content-Transfer-Encoding: 8bit

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 16.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Asia/kolkata
BEGIN:STANDARD
DTSTART:20091101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
TZNAME:IST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20090301T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
TZNAME:IST
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN="****":MAILTO:****
ATTENDEE;CN="Kamal";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:****
X-MS-OLK-SENDER;CN="Kamal":MAILTO:****
LAST-MODIFIED:20190625T45409
UID:20190626T1000004255310@****
DTSTAMP:20190625T45409
DTSTART;TZID="Asia/kolkata":20190626T100000
DTEND;TZID="Asia/kolkata":20190626T110000
TRANSP:OPAQUE
SEQUENCE:1
SUMMARY:My Test Meeting Setup
LOCATION:Joes House
DESCRIPTION:My Awesome Meeting Description
X-ALT-DESC;FMTTYPE=text/html:<html><body><a href="http://bing.com">Bing</a></body></html>
CLASS:PUBLIC
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
PRIORITY:5
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
ORGANIZER;CN="****":MAILTO:****
ATTENDEE;CN="Kamal";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:****
X-MS-OLK-SENDER;CN="Kamal":MAILTO:****
LAST-MODIFIED:20190625T45409
UID:20190626T140000916705683@****
DTSTAMP:20190625T45409
DTSTART;TZID="Asia/kolkata":20190626T140000
DTEND;TZID="Asia/kolkata":20190626T150000
TRANSP:OPAQUE
SEQUENCE:1
SUMMARY:My Test Meeting Setup 1
LOCATION:Joes House 1
DESCRIPTION:My Awesome Meeting Description 1
X-ALT-DESC;FMTTYPE=text/html:<html><body><a href="http://bing.com">Bing</a></body></html>
CLASS:PUBLIC
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
PRIORITY:5
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

Solution

  • This is not allowed by the iTIP protocol. See https://www.rfc-editor.org/rfc/rfc5546#section-3.2.2

    For the "REQUEST" method, multiple "VEVENT" components in a single iCalendar object are only permitted for components with the same "UID" property.

    In other words, you have to send multiple email messages.