我们如何获取 Outlook 收件人的实际电子邮件地址?

Fin*_*inn 4 email outlook

希望对今天困扰我的这个问题能得到一点帮助:

Outlook.MailItem mail = (Outlook.MailItem)Item;
Outlook.Recipients recips = mail.Recipients;
string toField = recips[1].Address; 
Run Code Online (Sandbox Code Playgroud)

我没有收到返回的实际地址。我已经尝试过 MSDN 网站上的建议,但没有成功。具体来说,PR_SMTP_ADDRESS 服务已失效:

Const PR_SMTP_ADDRESS As String = _ 
    "http://schemas.microsoft.com/mapi/proptag/0x39FE001E"  
Run Code Online (Sandbox Code Playgroud)

预先非常感谢大家提供的任何帮助。

Dmi*_*nko 5

用于Recipient.AddressEntry获取AddressEntry对象。检查AddressEntry.Type属性是否,如果是SMTP,就使用AddressEntry.Address。如果是EX,请使用AddressEntry.GetExchangeUser.PrimarySmtpAddress.