问题描述
我在使用 Outlook 2007 时遇到问题.当发送带有文本/日历"部分的多部分/替代"电子邮件时,Outlook 会识别日历事件,这就是它必须的方式.但是当添加文本/纯文本"部分时,Outlook 只显示纯文本,缺少日历部分(但它存在于电子邮件的源代码中).
I have problems with Outlook 2007. When sending a "multipart/alternative" email with a "text/calendar" part, Outlook recognizes the calendar event, that's how it has to be.But when adding a "text/plain" part, Outlook only displays the plain text, the calendar part is missing (but it's present in the source code of the email).
源码如下:
[...]
Content-Type: multipart/alternative;
boundary="_=_swift_v4_138243630552664dd1bc83e_=_"
--_=_swift_v4_138243630552664dd1bc83e_=_
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[...the plain message...]
--_=_swift_v4_138243630552664dd1bc83e_=_
Content-Type: text/calendar; charset=utf-8
Content-Transfer-Encoding: quoted-printable
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//GourmetPortal//NONSGML rr//DE
BEGIN:VEVENT
UID:res-Burkert
CREATED:20131030T113000Z
ORGANIZER;CN=3DSven Burkert:MAILTO:[...]
SUMMARY:[...]
DESCRIPTION:[...]
DTSTART:20131030T113000Z
END:VEVENT
END:VCALENDAR
--_=_swift_v4_138243630552664dd1bc83e_=_--
推荐答案
您在内容类型中都缺少 iTIP 方法:
You are missing the iTIP method, both in the content-type:
Content-Type: text/calendar; charset="utf-8"; method=REQUEST
以及作为 VCALENDAR 属性:
and as a VCALENDAR property as well:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//GourmetPortal//NONSGML rr//DE
该方法可能是 PUBLISH 或 REQUEST(在这种情况下,您还会错过一些 ATTENDEE 属性).
The method might be PUBLISH or REQUEST (in which case you also miss some ATTENDEE property).
然后,一些客户端在 multipart/alternative 中忽略了 iMIP,只将其视为附件,因此您可能需要尝试以下结构:
Then, some clients are ignoring iMIP in multipart/alternative and are looking only as attachments so you may need to try the following structure:
multipart/mixed
multipart/alternative
text/plain
text/calendar;method=REQUEST
text/calendar (with a content-disposition:attachment)
本质上,您添加了两次附件.来自google/yahoo日历和闪电的iMIP邀请就是这样的结构.
Essentially, you are adding the attachment twice. iMIP invitation from google/yahoo calendar and lightning have such a structure.
这篇关于带有文本和日历的多部分电子邮件:Outlook 无法识别 ics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!