Outlook 2003 不接受 .ics 文件

发布于 2024-10-03 04:49:47 字数 1459 浏览 0 评论 0原文

我在将下面的 vcalendar“脚本”导入 Outlook 2003 时遇到问题。我正在做的是使用 php 的 mail() 函数,本质上是发送一条包含此日历的消息,从而创建一个事件。不幸的是,我为其创建此项目的团队无法升级到较新版本的 Outlook,因此如果 2003 年出现异常,可能会对其产生影响。它可以很好地导入 Google 日历,并根据 http://severinghaus.org/projects/icv/ ,它完美地验证了。我不断收到两个错误:

1 - 如果我将其发送到我的 Gmail 帐户并下载 .ics 文件,我会收到以下错误:

“无法导入 vCalendar 文件。如果您尝试以 iCalendar 格式保存定期农历约会,则可能会出现此错误。要避免此错误,请将约会选项设置为公历而不是农历。”

2 - 如果我将其发送到与 Outlook 关联的电子邮件帐户,它只会显示为无标题附件,并且当我双击该附件时,它会出于某种原因打开一个新消息对话框。

日历“脚本”如下 -

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

提前感谢大家的帮助!这是我第一次使用这些,所以如果有任何n00b错误,我深表歉意......

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

儭儭莪哋寶赑 2024-10-10 04:49:47

Outlook 2003 不符合标准。除此之外,您还必须包含 PRODID 和 UID

此外,尽管这不适用于上述示例,但如果您尝试构建包含日期但没有时间的 ics 文件,则必须将日期格式化为如下所示:
DTSTART;VALUE=DATE:20110101 {或者任何日期,显然}。

尝试从 Outlook 2003 导出日历项目,看看效果如何。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文