Im building something that awkwardly resembles Facebook, to use as an intranet... and as such, the system allows you to organise meetings. In my attempt to make this thing useful, I thought it would be cool to email everyone thats invited to the meeting an 'Outlook meeting Request', which I now discover can be an iCal/vCal formatted email...
So far, Ive had limited success, despite reading many posts which largely claim its a piece of cake...
$body = '';
$body .= "BEGIN:VCALENDAR\n";
$body .= "PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN\n";
$body .= "VERSION:2.0\n";
$body .= "METHOD:REQUEST\n";
$body .= "BEGIN:VEVENT\n";
$body .= "ORGANIZER:MAILTO:Administrator@exchange.org\n";
$body .= "DTSTART:" . date('Ymd',$meeting['start_mktime']) . date('His',$meeting['start_mktime']) . "\n";
$body .= "DTEND:20060306T053000Z\n";
$body .= "LOCATION:location\n";
$body .= "TRANSP:OPAQUE\n";
$body .= "SEQUENCE:0\n";
$body .= "UID:".date('Ymd').'T'.date('His')."-".rand()."-offacebook.com\n"; // required by Outlok
$body .= "DTSTAMP:".date('Ymd').'T'.date('His')."\n"; // required by Outlook
$body .= "DESCRIPTION: " . $meeting['blurb'] . "\n";
$body .= "SUMMARY:" . $meeting['title'] . "\n";
$body .= "PRIORITY:5\n";
//$body .= "X-MICROSOFT-CDO-IMPORTANCE:1\n";
$body .= "CLASS:PUBLIC\n";
$body .= "END:VEVENT\n";
$body .= "END:VCALENDAR\n";
What Ive done is create this vCal template, which I fill in with some of my own variables... the $body is then put into my email function as the body of a plain-text email... this all works great, and the email arrives and it is plain-text, as far as I can tell, if I 'view source' all I see is text, no HTML tags...
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER:MAILTO:Administrator@exchange.org
DTSTART:20100526174500
DTEND:20060306T053000Z
LOCATION:location
TRANSP:OPAQUE
SEQUENCE:0
UID:20100525T154531-1991560951-offacebook.com
DTSTAMP:20100525T154531
DESCRIPTION: This is the description
SUMMARY:CheckUp
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR
Can anyone help?