我们如何获取Outlook收件人的实际电子邮件地址? [英] How do we get an Outlook Recipient's actual email address?

查看:3470
本文介绍了我们如何获取Outlook收件人的实际电子邮件地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆