我正在尝试将电子邮件地址输入到撰写邮件窗口的" 收件人"字段中.
我尝试获取收件人的地址属性,根据VS,应该给我电子邮件.
我收到一个看起来像这样的字符串:
"/c=US/a=att/p=Microsoft/o=Finance/ou=Purchasing/s=Furthur/g=Joe"
Run Code Online (Sandbox Code Playgroud)
如何在收件人字段中获取电子邮件地址?
我的代码到目前为止:
List <string> emails = new List<string>();
if (thisMailItem.Recipients.Count > 0)
{
foreach (Recipient rec in thisMailItem.Recipients)
{
emails.Add(rec.Address);
}
}
return emails;
Run Code Online (Sandbox Code Playgroud)