简体   繁体   English

VB.Net中的SMTP标头,无需兑换

[英]SMTP Headers in VB.Net without Redemption

I'm writing a mail component for a VB.Net app, and need to handle mails differently that are "Sent on Behalf" of someone. 我正在为VB.Net应用程序编写邮件组件,并且需要以不同的方式处理“代表他人发送”的邮件。 Although the Outlook Object Model exposes "SentOnBehalfOfName", it doesn't expose the email address for that party. 尽管Outlook对象模型公开了“ SentOnBehalfOfName”,但它没有公开该方的电子邮件地址。 Supposedly it's in the "OtherHeaders" field of the SMTP header, but I don't see an easy way to get to those through the Mailitem object. 假设它在SMTP标头的“ OtherHeaders”字段中,但是我看不到通过Mailitem对象访问这些标头的简单方法。 Am I missing something simple? 我是否缺少简单的东西?

our hacky workaround right now has been to construct a dummy reply. 我们目前的骇客解决方法是构造一个虚拟回复。 the reply-to field is populated based on the sentonbehalfof name, so then we can grab it and destroy the dummy. 根据sendonbehalfof名称填充了reply-to字段,因此我们可以抓住它并销毁该虚拟对象。 inelegant for sure, but it works 肯定不雅,但它有效

You could look up the name in AD or the GAL ? 您可以在AD或GAL中查找名称吗? or you could look up the PR_SENT_REPRESENTING_EMAIL_ADDRESS via a MailItem.PropertyAccessor id you are using 2007 或者您可以通过使用MailItem.PropertyAccessor ID的2007查找PR_SENT_REPRESENTING_EMAIL_ADDRESS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM