简体   繁体   English

如何获取收件人,密件抄送,抄送电子邮件地址而不是显示名称?

[英]how to get the To, BCC, CC Email address instead of Display names?

I am able to get the To, BCC, CC, Subject, Body on Item send event but my problem is I am getting the display names instead of Email addresses 我能够收到“收件人”,“密件抄送”,“抄送”,“主题”,“按项目发送正文”事件,但是我的问题是我正在获取显示名称而不是电子邮件地址

   MailItem outlookMailItem = (Microsoft.Office.Interop.Outlook.MailItem)Item;
   outlookPropertites.ToAddress = outlookMailItem.To;

this is returning me the display name but I want the email addresses. 这是返回的显示名称,但我需要电子邮件地址。 Is there any other property to get the email addresses? 还有其他属性可以获取电子邮件地址吗?

循环遍历MailItem.Recipients集合,对于每个收件人,检查Type (olTo / olCC / OlBCC), NameAddress属性。

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

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