I am trying to get the SMTP Adress of the sender in an outlook plugin. This worked as expected when I follow the examples from MSDN like 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);
}
}
But since some time (some weeks) the reference schema at
http://schemas.microsoft.com/mapi/proptag/0x39FE001E
can not be resolved anymore. Errormessage:
System.Runtime.InteropServices.COMException: http://schemas.microsoft.com/mapi/proptag/0x39FE001E Property unknown or ca not be found.
If I try the URL in a browser I get:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
All examples I can find (for office 2013 and above) are pointing to ressources at http://schemas.microsoft.com/mapi/proptag/SOMETHING
I also could not find any info in forums or oon MSDN that this moved or changed ..
Is anyone else running into this ? Is ther a known solution or workaroud.