事件邀请会导致Gmail显示两个要添加到gcal的事件

时间:2015-03-18 23:11:29

标签: outlook gmail icalendar

我生成的电子邮件中包含ICS格式的活动,我希望Gmail和Outlook都能识别。正如我在其他地方看到的那样,它由多条/混合信息组成。在其中,有一个带有text / plain,text / html和text / calendar部分的multi / alt。最后的应用程序/ ics部分。 Gmail认识到了这一点,并提出了“添加到Google日历”#39;按钮,但它认为有两个相同的事件。我知道最终的应用程序/ ics部分是针对Outlook的,但它似乎会导致重复。我错过了什么?

以下是一条示例消息:

Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="001643911600085117750003319898"

--001643911600085117750003319898
Content-Type: multipart/alternative; boundary="yabbadabbadoo"

--yabbadabbadoo
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

This is my plain text part


--yabbadabbadoo
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This is my HTML part

--yabbadabbadoo
Content-Type: text/calendar; charset=UTF-8; method=PUBLISH
Content-Transfer-Encoding: quoted-printable

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:calendar.10@groups.io
DTSTAMP:20150318T225646Z
DTSTART:20150321T000000Z
DTEND:20150321T010000Z
SUMMARY:test 6
DESCRIPTION:5-7pm pacific time
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test 6
TRIGGER:-PT5H
END:VALARM
END:VEVENT
END:VCALENDAR

--yabbadabbadoo--


--001643911600085117750003319898
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="invite.ics"
Content-Type: application/ics; name="invite.ics"

QkVHSU46VkNBTEVOREFSClZFUlNJT046Mi4wClBST0RJRDotLy9Hcm91cHMuaW8gSW5jLy9Hcm91
cHMuaW8gQ2FsZW5kYXIvL0VOCk1FVEhPRDpQVUJMSVNICkNBTFNDQUxFOkdSRUdPUklBTgpCRUdJ
TjpWRVZFTlQKVUlEOmNhbGVuZGFyLjEwQGdyb3Vwcy5pbwpEVFNUQU1QOjIwMTUwMzE4VDIyNTY0
NloKU1VNTUFSWTp0ZXN0IDYKRFRTVEFSVDoyMDE1MDMyMVQwMDAwMDBaCkRURU5EOjIwMTUwMzIx
VDAxMDAwMFoKREVTQ1JJUFRJT046NS03cG0gcGFjaWZpYyB0aW1lCkJFR0lOOlZBTEFSTQpBQ1RJ
T046RElTUExBWQpERVNDUklQVElPTjp0ZXN0IDYKVFJJR0dFUjotUFQ1SApFTkQ6VkFMQVJNCkVO
RDpWRVZFTlQKRU5EOlZDQUxFTkRBUg==


--001643911600085117750003319898--

2 个答案:

答案 0 :(得分:0)

Outlook希望邮件只有一个部分 - 文本/日历。

纯文本和HTML正文以及附件需要成为vCalendar数据的一部分。

您的整个信息必须如下:

Mime-Version: 1.0
Content-Type: text/calendar; charset=UTF-8; method=PUBLISH
Content-Transfer-Encoding: quoted-printable
Subject: test 6

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:calendar.10@groups.io
DTSTAMP:20150318T225646Z
DTSTART:20150321T000000Z
DTEND:20150321T010000Z
SUMMARY:test 6
DESCRIPTION:5-7pm pacific time
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test 6
TRIGGER:-PT5H
END:VALARM
END:VEVENT
END:VCALENDAR

答案 1 :(得分:0)

我在ICS文件中缺少ORGANIZER字段。我添加后,Gmail不再显示重复的事件。