Outlook 中的 ICS 作为 .msg 文件发送

发布于 2024-09-12 16:48:00 字数 1906 浏览 4 评论 0原文

我有一个应用程序,它正在创建一个类似于以下内容的 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"

两者都有四个消息部分:

  1. 文本
  2. HTML
  3. 附件 1
  4. 附件 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:

  1. Text
  2. HTML
  3. Attachment 1
  4. 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 技术交流群。

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

发布评论

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

评论(3

情释 2024-09-19 16:48:01

这看起来是 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.

一场春暖 2024-09-19 16:48:01

您是否将 VCALENDAR 添加为主要(且唯一)MIME 部分或作为附件之一?
有很大的不同。

Do you add VCALENDAR as the main (and only) MIME part or as one of the attachments?
There is a big difference.

甜味拾荒者 2024-09-19 16:48:01

电子邮件中可能缺少 TNEF 数据。如果是这种情况,那么电子邮件将呈现为纯文本。您应该检查 TNEF 设置,看看它是否已从电子邮件中删除。

检查 ESM 以查看删除 TNEF 的选项是否已打开。

来自 MSDN:

除了接收客户端之外,
对于邮件服务器来说这并不罕见
从中删除 TNEF 信息
邮件消息传递时。
如果打开了删除 TNEF 的服务器选项,客户端将始终收到
消息的纯文本版本。

Microsoft Exchange Server 是一个
邮件服务器应用程序示例
可以选择删除 TNEF
来自消息。

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:

In addition to the receiving client,
it is not uncommon for a mail server
to strip out TNEF information from
mail messages as it delivers them.
If a server option to remove TNEF is turned on, clients will always receive
a plain text version of the message.

Microsoft Exchange Server is an
example of a mail server application
that has the option to remove TNEF
from messages.

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