我试图在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
无法解决 . Errormessage :
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.
我也无法在论坛或MSDN中找到任何关于此移动或更改的信息 .
还有其他人遇到这个吗?是一个已知的解决方案或workaroud .