BCC 从未使用 SpecifiedPickupDirectory 从 Exchange 2007 发送

发布于 2024-07-15 00:42:50 字数 1902 浏览 5 评论 0原文

我使用 Exchange 2007 拾取目录通过 System.Net.Mail.SmtpClient 从 ASP.NET 应用程序发送电子邮件。 因此,我使用 SmtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory。 它发送电子邮件很好,但后来我注意到密件抄送根本不起作用。 放置在拾取文件夹中的文件似乎具有正确的设置,但 Exchange 忽略了 X-Receiver 列表。 以下是正在创建的 EML 文件的示例:

X-Sender: "Joe" <[email protected]>
X-Receiver: [email protected]
X-Receiver: [email protected]
X-Receiver: [email protected]
MIME-Version: 1.0
From: "Joe" <[email protected]>
To: [email protected]
Date: 10 Mar 2009 9:32:27 -0500
Subject: Test Message
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<p>Test Message</p>

contact@ 和 lindsey@ 是密件抄送收件人。 当我使用网络发送时,效果很好。 BCC 仅停止使用拾取目录。 所以你知道,我使用的是 Windows Server 2008 和 ASP.NET 3.5 / C#。

解决方法

Exchange 2007 似乎忽略了 X-Receiver,并期望看到 Bcc:。 因此,我采取了 mailMessage.Headers.Add("Bcc", bccList) 的方法,其中 bccList 是用分号分隔的电子邮件地址列表。 效果很好。

但正如 Chase Seibert 指出的,如果您查看电子邮件客户端中的消息标题,您仍然可以看到列出的所有 X 接收器。 尽管密件抄送已被删除,从而对收件人隐藏。 因此,您可以获得密件抄送的效果,并且有人可能会打开邮件并看到所有密件抄送。 我认为抑制 X-Receivers 列表的最佳方法是不在 mailMessage.Bcc 属性中包含任何内容。

I'm using an Exchange 2007 pickup directory to send emails from my ASP.NET application with System.Net.Mail.SmtpClient. Thus I'm using SmtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory. It sends emails fine, but then I noticed that BCC is not working at all. The file being placed in the pickup folder seems to have the right settings, but Exchange is ignoring the X-Receiver list. Here is a sample of the EML file being created:

X-Sender: "Joe" <[email protected]>
X-Receiver: [email protected]
X-Receiver: [email protected]
X-Receiver: [email protected]
MIME-Version: 1.0
From: "Joe" <[email protected]>
To: [email protected]
Date: 10 Mar 2009 9:32:27 -0500
Subject: Test Message
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<p>Test Message</p>

contact@ and lindsey@ are the BCC recipients. When I use a network send, it works fine. BCC only stops working with the pickup directory. So you know, I'm using Windows Server 2008 and ASP.NET 3.5 / C#.

Workaround

It seems that Exchange 2007 ignores the X-Receiver and expects to see Bcc: instead. So I've resorted to doing mailMessage.Headers.Add("Bcc", bccList) where bccList is a semicolon-delimited list of the email addresses. That works fine.

But as pointed Chase Seibert out if you look at the header of the message in the email client, you can still see all the X-Receivers listed. Though Bcc is stripped out and thus hidden from the recipients. So you get the effect of a Bcc with the possibility that someone will open the message and see all the Bcc's. I think the best way to suppress the X-Receivers list is to not include anything in the mailMessage.Bcc property.

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

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

发布评论

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

评论(1

情徒 2024-07-22 00:42:50

这在 Windows 2003 Server 中绝对有效,只需操作系统附带的 MS SMTP 实现即可。 我的理解是 Exchange 使用相同的服务来进行发送。

虽然这可能无法回答您的问题,但我想指出 Pickup 方法有一个您可能没有意识到的缺点。 通常,MS SMTP 在入站传输期间从 EML 中删除 BCC 和 X-Recipient 标头。

当您将 EML 放入 Pickup 时,您可以跳过此步骤。 因此,如果远程收件人查看电子邮件标头,他们实际上将能够看到密件抄送收件人。 尝试向 Gmail 帐户发送电子邮件并密送其他人。 如果您在 Gmail 中查看标头,您将看到密件抄送收件人。

我建议使用 SMTP 来传递此消息。

This definitely works in Windows 2003 Server w/ just the MS SMTP implementation that ships with the OS. My understanding is that Exchange uses the same service to do it's sending.

Though this may not answer your question, I wanted to note that the Pickup method has a drawback that you might not be aware of. Typically, MS SMTP strips BCC and X-Recipient headers from the EML during the inbound transport.

When you put the EML into Pickup, you skip this step. Thus, remote recipients will actually be able to SEE the BCC recipients if they look at the email header. Try sending an email to a gmail account and BCC someone else. If you view the header in Gmail, you will see the BCC recipient.

I would recommend using SMTP to hand-off this message instead.

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