<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Generate Outlook Calendar Events with PHP and iCalendar</title>
	<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/</link>
	<description>Utterly random, incoherent and disjointed rants and ramblings...</description>
	<pubDate>Sat, 10 Jan 2009 02:56:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Terry S</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10642</link>
		<pubDate>Mon, 10 Nov 2008 08:35:08 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10642</guid>
					<description>Hi Kris  

I managed to get my php app working with a downloadable ics file.  I am only struggling with assigning this to a person.

I would suggest you read the rfc2445 and the wikipedia on icalendar files.  Which part are you struggling with exactly?  I will try my best to point you in the right direction.</description>
		<content:encoded><![CDATA[<p>Hi Kris  </p>
<p>I managed to get my php app working with a downloadable ics file.  I am only struggling with assigning this to a person.</p>
<p>I would suggest you read the rfc2445 and the wikipedia on icalendar files.  Which part are you struggling with exactly?  I will try my best to point you in the right direction.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Kris Anderson</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10635</link>
		<pubDate>Sat, 08 Nov 2008 15:29:31 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10635</guid>
					<description>Hi ,
 
I need to send meeting requests(outlook) to different people through PHP.
I figure sending a .ics file as attachment to an email will do the job.
i am stuck, my implementation will send a mail, with the contents of the .ics file as part of the body of the mail. If somebody has got this working, can you please help out?</description>
		<content:encoded><![CDATA[<p>Hi ,</p>
<p>I need to send meeting requests(outlook) to different people through PHP.<br />
I figure sending a .ics file as attachment to an email will do the job.<br />
i am stuck, my implementation will send a mail, with the contents of the .ics file as part of the body of the mail. If somebody has got this working, can you please help out?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Terry S</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10555</link>
		<pubDate>Fri, 31 Oct 2008 19:17:10 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10555</guid>
					<description>I think further testing on my side needs to be done!</description>
		<content:encoded><![CDATA[<p>I think further testing on my side needs to be done!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: dm</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10551</link>
		<pubDate>Fri, 31 Oct 2008 17:00:42 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10551</guid>
					<description>is there a way you can push this to receiver's calendar?</description>
		<content:encoded><![CDATA[<p>is there a way you can push this to receiver&#8217;s calendar?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Luke Maciak</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10549</link>
		<pubDate>Fri, 31 Oct 2008 16:26:02 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10549</guid>
					<description>No clue. What happens when you specify these users as &lt;a href="http://www.kanzaki.com/docs/ical/attendee.html" rel="nofollow"&gt;attendees&lt;/a&gt; for your event? Does it show up on their calendars?

If not then I have no clue. Also I have no shared calendar setup to test it with so good luck with that.</description>
		<content:encoded><![CDATA[<p>No clue. What happens when you specify these users as <a href="http://www.kanzaki.com/docs/ical/attendee.html" rel="nofollow">attendees</a> for your event? Does it show up on their calendars?</p>
<p>If not then I have no clue. Also I have no shared calendar setup to test it with so good luck with that.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Terry S</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10544</link>
		<pubDate>Fri, 31 Oct 2008 14:45:26 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-10544</guid>
					<description>Thanks for the info, does anyone know how to create these ics files so that they can be assigned to another user?  

I have developed a PHP app and we use Outlook with the shared calendar system.  We book in appointments for our staff but was wondering whether it would be possible to automatically load the appointments into the users calendar rather than my own.

I need an answer to this fairly quickly, please please help!!!</description>
		<content:encoded><![CDATA[<p>Thanks for the info, does anyone know how to create these ics files so that they can be assigned to another user?  </p>
<p>I have developed a PHP app and we use Outlook with the shared calendar system.  We book in appointments for our staff but was wondering whether it would be possible to automatically load the appointments into the users calendar rather than my own.</p>
<p>I need an answer to this fairly quickly, please please help!!!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Gene Z</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9968</link>
		<pubDate>Tue, 26 Aug 2008 14:51:27 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9968</guid>
					<description>hm, some characters were dropped when the code sample got posted.  When you see a stray "r" or "n", assume it should have a backslash in front of it.  Also, the value of "from" should have an email address in angle brackets after the text name.</description>
		<content:encoded><![CDATA[<p>hm, some characters were dropped when the code sample got posted.  When you see a stray &#8220;r&#8221; or &#8220;n&#8221;, assume it should have a backslash in front of it.  Also, the value of &#8220;from&#8221; should have an email address in angle brackets after the text name.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Gene Z</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9967</link>
		<pubDate>Tue, 26 Aug 2008 14:29:05 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9967</guid>
					<description>@Wolf
Sure, for what it's worth.  The code below indeed sent a meeting invite, but it was not linked to an actual appointment in Outlook.  As fate would have it, I had to switch to Java anyway, so never advanced the PHP code any further.  What I needed was to send invites for an appointment on our Exchange server, so to do that I need a package to interface with Exchange (no way I'm tackling a MS API directly).

Hope this helps in some way:

&lt;pre lang="php"&gt;
  $to   = "myname@mydomain.com";
  $from = "Gene Z";
  $subj = "my test subject";
  $msg  = "this is the email body";

  $file_att_type = "text/calendar; method=REQUEST";
  $file_att_name = "att.ics";

  $mime_boundary = "==Multipart_Boundary_x{" . md5(mt_rand()) . "}x";

  $header = "From: " . $from . "\r\n" .
            "MIME-Version: 1.0\r\n" .
            "Content-Type: multipart/mixed; boundary=\"{$mime_boundary}\"";

  $txt_msg = "this is my text message, to be attached\r\n" .
             "not much to it, eh.";


  //Various ways to creat a new, random UID
  $cal_uid = "{" . uniqid(mt_rand(), true) . "}";
  $cal_uid = "{" . date('Ymd').'T'.date('His')."-".rand()."@mydomain.com}";
  $cal_uid = com_create_guid();

  $msg .= "\nwith uid of $cal_uid\n";

  $cal_msg =
"BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER:MAILTO:myname@mydomain.com
DTSTART:20080714T170000Z
DTEND:20080715T035959Z
UID:" . $cal_uid . "
LOCATION:my meeting location
TRANSP:OPAQUE
SEQUENCE:0
DTSTAMP:20060309T045649Z
CATEGORIES:Meeting
DESCRIPTION:meeting description, line 1 of 2.\nline 2 of 2.\n\n
SUMMARY:meeting subject
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT3D
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
BEGIN:VTIMEZONE
TZID:US/Central
END:VTIMEZONE
END:VEVENT
END:VCALENDAR";

  $msg = "This is a multi-part message in MIME format.\n\n" .
         "--{$mime_boundary}\n" . 
         "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . 
         "Content-Transfer-Encoding: 7bit\n\n" . 

         $msg .

         "\n\n--{$mime_boundary}\n" . 
         "Content-Type: $file_att_type; name=$file_att_name\n" . 
         "Content-Disposition: attachment; filename=$file_att_name\n" .
         "Content-Transfer-Encoding: base64\n\n" . 
         chunk_split(base64_encode($cal_msg)) . "\n\n" . 
         "--{$mime_boundary}--\n"; 

  if (mail($to, $subj, $msg, $header, "")) {
    echo "test email sent";
  } else {
    echo "test email failed";
  }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Wolf<br />
Sure, for what it&#8217;s worth.  The code below indeed sent a meeting invite, but it was not linked to an actual appointment in Outlook.  As fate would have it, I had to switch to Java anyway, so never advanced the PHP code any further.  What I needed was to send invites for an appointment on our Exchange server, so to do that I need a package to interface with Exchange (no way I&#8217;m tackling a MS API directly).</p>
<p>Hope this helps in some way:</p>

<div class="wp_syntax"><div class="code"><pre class="php">  <span style="color: #0000ff;">$to</span>   = <span style="color: #ff0000;">&quot;myname@mydomain.com&quot;</span>;
  <span style="color: #0000ff;">$from</span> = <span style="color: #ff0000;">&quot;Gene Z&quot;</span>;
  <span style="color: #0000ff;">$subj</span> = <span style="color: #ff0000;">&quot;my test subject&quot;</span>;
  <span style="color: #0000ff;">$msg</span>  = <span style="color: #ff0000;">&quot;this is the email body&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$file_att_type</span> = <span style="color: #ff0000;">&quot;text/calendar; method=REQUEST&quot;</span>;
  <span style="color: #0000ff;">$file_att_name</span> = <span style="color: #ff0000;">&quot;att.ics&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$mime_boundary</span> = <span style="color: #ff0000;">&quot;==Multipart_Boundary_x{&quot;</span> . <span style="color: #000066;">md5</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">mt_rand</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot;}x&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$header</span> = <span style="color: #ff0000;">&quot;From: &quot;</span> . <span style="color: #0000ff;">$from</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> .
            <span style="color: #ff0000;">&quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> .
            <span style="color: #ff0000;">&quot;Content-Type: multipart/mixed; boundary=<span style="color: #000099; font-weight: bold;">\&quot;</span>{$mime_boundary}<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$txt_msg</span> = <span style="color: #ff0000;">&quot;this is my text message, to be attached<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> .
             <span style="color: #ff0000;">&quot;not much to it, eh.&quot;</span>;
&nbsp;
&nbsp;
  <span style="color: #808080; font-style: italic;">//Various ways to creat a new, random UID</span>
  <span style="color: #0000ff;">$cal_uid</span> = <span style="color: #ff0000;">&quot;{&quot;</span> . <span style="color: #000066;">uniqid</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">mt_rand</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot;}&quot;</span>;
  <span style="color: #0000ff;">$cal_uid</span> = <span style="color: #ff0000;">&quot;{&quot;</span> . <span style="color: #000066;">date</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Ymd'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">'T'</span>.<span style="color: #000066;">date</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'His'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;-&quot;</span>.<span style="color: #000066;">rand</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;@mydomain.com}&quot;</span>;
  <span style="color: #0000ff;">$cal_uid</span> = com_create_guid<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
  <span style="color: #0000ff;">$msg</span> .= <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>with uid of $cal_uid<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$cal_msg</span> =
<span style="color: #ff0000;">&quot;BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER:MAILTO:myname@mydomain.com
DTSTART:20080714T170000Z
DTEND:20080715T035959Z
UID:&quot;</span> . <span style="color: #0000ff;">$cal_uid</span> . <span style="color: #ff0000;">&quot;
LOCATION:my meeting location
TRANSP:OPAQUE
SEQUENCE:0
DTSTAMP:20060309T045649Z
CATEGORIES:Meeting
DESCRIPTION:meeting description, line 1 of 2.<span style="color: #000099; font-weight: bold;">\n</span>line 2 of 2.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>
SUMMARY:meeting subject
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT3D
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
BEGIN:VTIMEZONE
TZID:US/Central
END:VTIMEZONE
END:VEVENT
END:VCALENDAR&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$msg</span> = <span style="color: #ff0000;">&quot;This is a multi-part message in MIME format.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> .
         <span style="color: #ff0000;">&quot;--{$mime_boundary}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
         <span style="color: #ff0000;">&quot;Content-Type: text/plain; charset=<span style="color: #000099; font-weight: bold;">\&quot;</span>iso-8859-1<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
         <span style="color: #ff0000;">&quot;Content-Transfer-Encoding: 7bit<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
&nbsp;
         <span style="color: #0000ff;">$msg</span> .
&nbsp;
         <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>--{$mime_boundary}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
         <span style="color: #ff0000;">&quot;Content-Type: $file_att_type; name=$file_att_name<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
         <span style="color: #ff0000;">&quot;Content-Disposition: attachment; filename=$file_att_name<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> .
         <span style="color: #ff0000;">&quot;Content-Transfer-Encoding: base64<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
         <span style="color: #000066;">chunk_split</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">base64_encode</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cal_msg</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . 
         <span style="color: #ff0000;">&quot;--{$mime_boundary}--<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>; 
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">mail</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$to</span>, <span style="color: #0000ff;">$subj</span>, <span style="color: #0000ff;">$msg</span>, <span style="color: #0000ff;">$header</span>, <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000066;">echo</span> <span style="color: #ff0000;">&quot;test email sent&quot;</span>;
  <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000066;">echo</span> <span style="color: #ff0000;">&quot;test email failed&quot;</span>;
  <span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
				</item>
	<item>
		<title>by: Wolf</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9964</link>
		<pubDate>Tue, 26 Aug 2008 13:46:45 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9964</guid>
					<description>@Gene Z
Can you post your mail function out here..
I'm looking for this MS Outlook hack for few weeks.
finaly google gave me back some result.

I need to send out meeting request to persons. one at a time.

Perfect Post :)</description>
		<content:encoded><![CDATA[<p>@Gene Z<br />
Can you post your mail function out here..<br />
I&#8217;m looking for this MS Outlook hack for few weeks.<br />
finaly google gave me back some result.</p>
<p>I need to send out meeting request to persons. one at a time.</p>
<p>Perfect Post <img src="http://www.terminally-incoherent.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=")" class="wp-smiley" />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Luke Maciak</title>
		<link>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9821</link>
		<pubDate>Mon, 11 Aug 2008 14:01:25 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/#comment-9821</guid>
					<description>&lt;strong&gt;@Nancy&lt;/strong&gt; - I haven't tried implementing it, but have you tried using the &lt;a href="http://www.kanzaki.com/docs/ical/rrule.html" rel="nofollow"&gt;RRULE&lt;/a&gt; field? Also read up on SEQUENCE and RECURRENCE-ID fields - I suspect that Outlook needs a way to create unique references for each recurring instance and the key is in these fields.

But, again I haven't tested it. If you figure it out, please let us know the solution!</description>
		<content:encoded><![CDATA[<p><strong>@Nancy</strong> - I haven&#8217;t tried implementing it, but have you tried using the <a href="http://www.kanzaki.com/docs/ical/rrule.html" rel="nofollow">RRULE</a> field? Also read up on SEQUENCE and RECURRENCE-ID fields - I suspect that Outlook needs a way to create unique references for each recurring instance and the key is in these fields.</p>
<p>But, again I haven&#8217;t tested it. If you figure it out, please let us know the solution!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.850 seconds -->
