3

I am having trouble importing the vcalendar "script" below into Outlook 2003. What I am doing is using php's mail() function, and essentially sending a message that will contain this calendar, and thus create an event. Unfortunately, the team I am creating this for cannot upgrade to a newer version of Outlook, so if there is a 2003 quirk, that may be affecting it. It imports fine into Google Calendar, and according to http://severinghaus.org/projects/icv/, it validates perfectly. There are two errors I keep receiving:

1 - If I send this to, let's say my Gmail account and download the .ics file, I get the following error:

"Cannot import vCalendar file. This error can appear if you have attempted to save a recurring Lunar appointment in iCalendar format. To avoid this error, set the appointment option to Gregorian instead of Lunar."

2 - If I send this to the email account associated with Outlook, it just shows up as an Untitled Attachment, and when I double-click that attachment, it opens up a new message dialog for some reason.

The calendar "script" is below -

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:THIS IS THE CALENDAR NAME
X-WR-TIMEZONE:America/Chicago
BEGIN:VTIMEZONE
TZID:America/Chicago
X-LIC-LOCATION:America/Chicago
BEGIN:DAYLIGHT
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
TZNAME:CDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
TZNAME:CST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART:20101117T170000Z
DTEND:20101117T180000Z
DTSTAMP:20101116T175944Z
CREATED:20101116T034056Z
DESCRIPTION:This is the description.
LAST-MODIFIED:20101116T034056Z
LOCATION:THIS IS THE LOCATION
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:This is the summary!
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Thank you all for the help in advance! This is my first time working with these, so I apologize if there are any n00b mistakes...

user511292
  • 63
  • 7
  • I'm not sure you get asked to add this to your calender when you receive it since it's METHOD:PUBLISH and not METHOD:REQUEST, but that won't solve your other problem. – Ulrich Schwarz Nov 18 '10 at 16:46

1 Answers1

0

Outlook 2003 is not standards compliant. Among other things, you have to include a PRODID and UID

Also, although this does not apply to the above sample, if you try to build an ics file with dates but no times, you must format the dates like this: DTSTART;VALUE=DATE:20110101 {or whatever date, obviously}.

Try exporting a calendar item from Outlook 2003 to see what it likes.

Gullbyrd
  • 1,545
  • 1
  • 16
  • 14