Outlook 中的 ICS 作为 .msg 文件发送
我有一个应用程序,它正在创建一个类似于以下内容的 ICS:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[email protected]
ORGANIZER:MAILTO:[email protected]
DTSTART:20100803T190000Z
DTEND:20100803T200000Z
LOCATION:Go to http://100.200.0.55/Login/ParticipantLogIn.asp and enter
Conference ID: 0000
SEQUENCE:0
UID:352C75A6-0117-4B3A-AFE6-7B18649CD45A
DTSTAMP:20100803T184455Z
DESCRIPTION:TO ACCESS THE WEB CONFERENCE:\n\n Click on the link bel
ow:\n
SUMMARY:Test User's Conference
PRIORITY:5
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
当发送到 Gmail 帐户时,它会作为 ICS 文件发送,并且一切都是正确的。当发送到 Outlook 2003 或 2007 时,它会作为二进制文件附加为 .msg 文件。使用的服务器是Windows Server 2008。我已将其上的ics mime类型设置为text/calendar。添加它的过程只是在磁盘上创建一个 tmp 文件并将其作为附件添加,然后使用 CDO 发送。有谁知道 Outlook 将其添加为 .msg 的原因是什么?
此外,我们使用相同的交换服务器,它在 Windows Server 2003 中工作正常。
使用附件的网络跟踪进行更新
2003
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073
Content-Type: application/octet-stream;
name="meeting.ics"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="meeting.ics"
2008
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18197
Content-Type: text/calendar;
name="meeting.ics"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="meeting.ics"
两者都有四个消息部分:
- 文本
- HTML
- 附件 1
- 附件 2
在有效的 2003 版本中,一个是应用程序/八位字节流,一个是日历/文本。 2008 年,它们都是日历/文本。
I have an application, it is creating an ICS similar to the following:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[email protected]
ORGANIZER:MAILTO:[email protected]
DTSTART:20100803T190000Z
DTEND:20100803T200000Z
LOCATION:Go to http://100.200.0.55/Login/ParticipantLogIn.asp and enter
Conference ID: 0000
SEQUENCE:0
UID:352C75A6-0117-4B3A-AFE6-7B18649CD45A
DTSTAMP:20100803T184455Z
DESCRIPTION:TO ACCESS THE WEB CONFERENCE:\n\n Click on the link bel
ow:\n
SUMMARY:Test User's Conference
PRIORITY:5
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
When sent to a Gmail account it is being sent as an ICS file and everything is correct. When sent to Outlook 2003 or 2007, it is attached as a .msg file and is binary. The server being used is Windows Server 2008. I have set ics mime type as text/calendar on it. The process for adding it is just creating a tmp file on disk and adding it as an attachment, then sending using CDO. Does anyone know any reason why Outlook would be adding it as a .msg?
Also, we use the same exchange server and it works fine from Windows Server 2003.
Updating with network trace for the attachment
2003
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073
Content-Type: application/octet-stream;
name="meeting.ics"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="meeting.ics"
2008
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18197
Content-Type: text/calendar;
name="meeting.ics"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="meeting.ics"
In both there are four message parts:
- Text
- HTML
- Attachment 1
- Attachment 2
In the 2003 version that works, one is an application/octet stream and one is calendar/text. In 2008 they both are calendar/text.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这看起来是 Windows Server 2008 上 CDO 的问题。对每台服务器上的网络流量进行跟踪后发现,传递的消息存在巨大差异。
似乎由于某种原因,AddAttachment 方法没有使用与 2003 年相同的 MIME。手动添加附件并控制 MIME 将修复该问题。
This looks to be a problem with CDO on Windows Server 2008. Doing a trace of the network traffic on each server showed a huge difference in the message being passed.
It appears as if for some reason the AddAttachment method is not using the same MIME as in 2003. Manually adding the attachment and controlling the MIME will fix it.
您是否将 VCALENDAR 添加为主要(且唯一)MIME 部分或作为附件之一?
有很大的不同。
Do you add VCALENDAR as the main (and only) MIME part or as one of the attachments?
There is a big difference.
电子邮件中可能缺少 TNEF 数据。如果是这种情况,那么电子邮件将呈现为纯文本。您应该检查 TNEF 设置,看看它是否已从电子邮件中删除。
检查 ESM 以查看删除 TNEF 的选项是否已打开。
来自 MSDN:
It is possible that the TNEF data is missing from the email. If this is the case then the email would be rendered as plain text. You should check the TNEF settings to see if it beings stripped from emails.
Check in ESM to see if the option to remove TNEF is ON.
From MSDN: