The summary is that I am now implementing an event confirmation system and can't find the right format for the ICalendar replies. Therefore I wonder if there is an example out there of complete REPLY message and maybe a PHP library that would wrap it all?
Now for the details, we get external emails including event invitations asking for RSVP. Here is an excerpt of the iCal file:
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="'user@company.com'":MAILTO:user@company.com
ORGANIZER;CN="Organ Izer":MAILTO:organizer@company.com
I couldn't find the reply standard to send the RSVP to the organizer. The RFC 2447 mentions "ATTSTAT" and "PARTSTAT" parameter.
By trying to mail the following message to Google calendar the event is not being updated.
$headers = "Content-Type:text/calendar; Content-Disposition: inline; charset=utf-8;\r\n";
$headers .= "Content-Type: text/plain;charset=\"utf-8\"\r\n";
$headers .= 'BEGIN:VCALENDAR
VERSION:2.0
METHOD:REPLY
BEGIN:VEVENT
ORGANIZER;CN=JCharles:mailto:abcdef@gmail.com
UID:oc7ae7537999onscsivg8km123@google.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=CONFIRMED;RSVP=
TRUE;CN=jc@company.se;X-NUM-GUESTS=0:mailto:jc@company.se
LOCATION:
SEQUENCE:1
END:VEVENT
END:VCALENDAR';
mail('abcdef@gmail.com', 'Accepted:', "Event accepted", $headers);
Is there anything wrong with the Ical message or with the method in itself? Is this the way the event replies are supposed to be sent?
The following code will work with google calendar. The attachment is processed by gmail and acceptance is cascaded to the event.
The important bits are
I am not sure that it is necessary to send back all redundant information (description, summary, dtend, dtstart)
The following solution worked for me:
This methods does not attach the ical format.