【发布时间】:2018-05-13 09:36:35
【问题描述】:
我正在尝试在 Outlook 插件中获取发件人的 SMTP 地址。 当我按照 MSDN 中的示例进行操作时,这按预期工作 喜欢this one here:
private void GetSMTPAddressForRecipients(Outlook.MailItem mail)
{
const string PR_SMTP_ADDRESS =
"http://schemas.microsoft.com/mapi/proptag/0x39FE001E";
Outlook.Recipients recips = mail.Recipients;
foreach (Outlook.Recipient recip in recips)
{
Outlook.PropertyAccessor pa = recip.PropertyAccessor;
string smtpAddress =
pa.GetProperty(PR_SMTP_ADDRESS).ToString();
Debug.WriteLine(recip.Name + " SMTP=" + smtpAddress);
}
}
但自从一段时间(几周)以来,参考架构在
http://schemas.microsoft.com/mapi/proptag/0x39FE001E
无法再解决。 错误消息:
System.Runtime.InteropServices.COMException: http://schemas.microsoft.com/mapi/proptag/0x39FE001E Property unknown or ca not be found.
如果我在浏览器中尝试该 URL,我会得到:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
我能找到的所有示例(对于 Office 2013 及更高版本)都指向 http://schemas.microsoft.com/mapi/proptag/SOMETHING 的资源
我也无法在论坛或 MSDN 上找到任何移动或更改的信息 ..
还有其他人遇到这个吗? 是否有已知的解决方案或解决方法。
【问题讨论】:
标签: c# outlook smtp exchange-server outlook-addin