我们如何获取Outlook收件人的实际电子邮件地址? [英] How do we get an Outlook Recipient's actual email address?
问题描述
Outlook.MailItem mail =(Outlook。的MailItem)项目;
Outlook.Recipients recips = mail.Recipients;
string toField = recips [1] .Address;
我没有收到实际的地址。我在MSDN网站上尝试过没有运气的建议。具体来说,PR_SMTP_ADDRESS服务已经死了:
Const PR_SMTP_ADDRESS As String = _
http://schemas.microsoft .com / mapi / proptag / 0x39FE001E
非常感谢您提供的任何帮助,
使用Recipient.AddressEntry获取AddressEntry对象。检查AddressEntry.Type属性,如果是SMTP,只需使用AddressEntry.Address。如果是EX,请使用AddressEntry.GetExchangeUser.PrimarySmtpAddress。
Hoping to get a little help with this one that has stumped me today:
Outlook.MailItem mail = (Outlook.MailItem)Item;
Outlook.Recipients recips = mail.Recipients;
string toField = recips[1].Address;
I'm not getting the actual address returned. I've tried suggestions on the MSDN site with no luck. Specifically, the PR_SMTP_ADDRESS service is dead:
Const PR_SMTP_ADDRESS As String = _
"http://schemas.microsoft.com/mapi/proptag/0x39FE001E"
Thanks very much in advance for any help you all can provide.
Use Recipient.AddressEntry to get the AddressEntry object. Check if the AddressEntry.Type property, if it is "SMTP", just use AddressEntry.Address. If it is "EX", use AddressEntry.GetExchangeUser.PrimarySmtpAddress.
这篇关于我们如何获取Outlook收件人的实际电子邮件地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!