'Customise ICS event, add actions
I would like to customize my ICS event sent as an attachment to an email in order for the user to be able to see and confirm the event directly from the mail view (example). Here is what the attached file invite.ics
looks like:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example//Booking//EN
METHOD:PUBLISH
BEGIN:VEVENT
UID:[email protected]
SEQUENCE:0
DTSTAMP:20180420T065714Z
DTSTART:20180518T080000Z
DTEND:20180518T090000Z
SUMMARY:Example - Booking room 21
LOCATION:Somewhere
DESCRIPTION:Room description
ORGANIZER;CN="Me":mailto:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE
URL;VALUE=URI:https://example.net/reservation/12
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR
In this event, URL does not work (I mean URL property does not bring anything to the event).
I would like in this event to:
- add (if the mailer supports it) a confirm action directly on the mail with "yes" or "no" options
- catch the answer of this yes/no question directly on an URL specified in the file (as https://example.net/confirmeRequest)
- eventually customise the event with a picture
I deeply took a look at the ICS specs, but they are quite complex and let a lot of specifics options implemented by mailers! I'm not looking for a solution using the Google Calendar API since I would like this feature to be supported by most existing mailers.
Here is an example of what I would like to get: example (on this picture, I would like to change the generic event image with a custom one and to catch the click on different actions).
I'm not really sure it's possible, maybe it's simply not!
Thanks in advance.
Solution 1:[1]
Having email clients handle invitations is possible. In the above example, you would need to change the METHOD property to "REQUEST", make the ATTENDEE compliant by using the actual email address of the recipient, and finally follow the rules of iMIP to generate your email (see for example Multipart email with text and calendar: Outlook doesn't recognize ics ). In general, the accept/decline will trigger an IMIP REPLY to be sent back to the organizer's email address.
Having the Yes/No response getting caught and sent via some url is not possible unless you target a very particular client that is under your control. So if you want to automate the accepting of invitation, you need to have something on the organiser's side that will process incoming emails containing iMIP REPLY.
As far as having clients display images, etc... the closest you can do is to use the non standard
X-ALT-DESC;FMTTYPE=text/html
property and display an HTML snippet here. This property being non standard, it will work with some email clients only. In any case, I doubt that the email client will let you display external images, for security reasons.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Arnaud Quillaud |