I am trying to make it so that when someone completes an event registration form on our website, they receive a confirmation email. Ideally, it would be an HTML email with a pretty little button to add the event to their calendar.
Using this article for reference, http://www.phpbuilder.com/columns/chow20021007.php3?print_mode=1, I have been able to create a calendar event file that I can send as an attachment on the email. It has the extension .vcs and has the following content:
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
SUMMARY:Test event
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Test event description.
DTSTART:20100325T180000Z
DTEND:20100325T190000Z
END:VEVENT
END:VCALENDAR
There are issues with doing it this way:
- The event does not have any details in iCal on a Mac
- When I open it in Outlook on Windows, I get a popup that you should only open attachments from a trustworthy source. It then adds the event just fine, but it does not look very professional. I think I need to set the MIME type for the file, but I do not know how.
As it stands, this functionality fulfills the basic requirements, but I would really like to clean it up and, as I said, embed the link into the email.
Any help would be appreciated.