为什么 BizTalk 2009 SMTP 适配器不支持 BCC 和优先级?
查看 http://msdn.microsoft.com/ 时en-us/library/aa560648(BTS.10).aspx 我找不到密件抄送或优先级,因此我确信它不受支持。
但为什么 ?
When looking at http://msdn.microsoft.com/en-us/library/aa560648(BTS.10).aspx I couldn't find BCC or Priority, so I'm sure it's not supported.
But why ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于为什么 SMTP 适配器中缺少 BCC 和优先级,我恐怕不知道 - 自该产品的第一个版本以来,BizTalk 中就一直缺少它。您可能需要询问 BizTalk 产品团队,我想他们只会耸耸肩。
然而,有一些解决方法可以在 BCC 和优先级中添加。
第一个解决方案是彻头彻尾的黑客攻击,但实施起来很快 - 发送两封电子邮件,第二封是您的密件抄送列表,其中提到它是密件抄送。丑陋,肯定会回来咬你。 (这仅适用于优先级)
第二种方法更正确,但也需要更多工作 - 创建您自己的支持这些属性的 SMTP 适配器。
System.Net.Mail
命名空间包含您推出支持 BCC 的适配器所需的所有内容。下面的代码示例来自 MSDN:
您甚至可以避免适配器的开销并将其实现为引用的程序集 - 这样做的缺点是,当使用适配器时,您会自动插入 BizTalk 消息传递框架及其功能(例如跟踪)。
For the why of BCC and Priority missing from the SMTP Adapter, no idea I'm afraid - it has been missing from BizTalk since the first release of the product. You'd probably have to ask the BizTalk product team and I imagine they would just shrug.
There are however, a couple of work-arounds to add in the BCC and priority.
The first work around is an out and out hack, but fast to implement - send two emails, with the second being your BCC list that mentions that it is a BCC. Ugly and sure to come back and bite you. (this only works for the priority)
The second way is more correct but also more work - create your own SMTP adapter that supports these properties. The
System.Net.Mail
namespace contains all you will need to roll your own adapter that supports BCC.The code example below comes from MSDN:
You could even avoid the overhead of an adapter and implement this as a referenced assembly - the downside of doing it that way is that when using an adapter you automatically get plugged into the BizTalk messaging framework and its features such as tracking.