小编Cat*_*Cat的帖子

Outlook:如何从收件人字段中获取电子邮件?

我正在尝试将电子邮件地址输入到撰写邮件窗口的" 收件人"字段中.

我尝试获取收件人的地址属性,根据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)

c# outlook vsto visual-studio

8
推荐指数
2
解决办法
7889
查看次数

标签 统计

c# ×1

outlook ×1

visual-studio ×1

vsto ×1