简体   繁体   中英

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. Although the Outlook Object Model exposes "SentOnBehalfOfName", it doesn't expose the email address for that party. 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. 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. inelegant for sure, but it works

You could look up the name in AD or the GAL ? or you could look up the PR_SENT_REPRESENTING_EMAIL_ADDRESS via a MailItem.PropertyAccessor id you are using 2007

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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