简体   繁体   English

Outlook 2003不接受.ics文件

[英]Outlook 2003 not accepting .ics file

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. 我在将下面的vcalendar“ script”导入Outlook 2003时遇到了麻烦。我正在做的是使用php的mail()函数,并实质上发送包含该日历的消息,从而创建一个事件。 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. 不幸的是,我为此创建的团队无法升级到Outlook的较新版本,因此,如果出现2003年的怪癖,可能会影响它。 It imports fine into Google Calendar, and according to http://severinghaus.org/projects/icv/ , it validates perfectly. 它可以很好地导入Google日历,并根据http://severinghaus.org/projects/icv/进行验证。 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: 1-如果我将其发送到我的Gmail帐户并下载.ics文件,则会收到以下错误消息:

"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." “无法导入vCalendar文件。如果尝试以iCalendar格式保存重复的农历约会,则会出现此错误。为避免此错误,请将约会选项设置为Gregorian而不是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. 2-如果我将其发送到与Outlook关联的电子邮件帐户,它只会显示为“无标题的附件”,并且当我双击该附件时,由于某种原因它将打开一个新的邮件对话框。

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... 这是我第一次使用它们,因此,如果出现任何n00b错误,我深表歉意...

Outlook 2003 is not standards compliant. Outlook 2003不符合标准。 Among other things, you have to include a PRODID and UID 除其他外,您必须包括PRODID和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}. 另外,尽管这不适用于以上示例,但是如果您尝试构建不带日期但没有时间的ics文件,则必须这样格式化日期:DTSTART; VALUE = DATE:20110101 {或显然是任何日期}。

Try exporting a calendar item from Outlook 2003 to see what it likes. 尝试从Outlook 2003导出日历项目以查看其喜欢的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM