问题
I am trying to get all the email Ids that belong to a person in Outlook. When I look at a contacts properties in Outlook, I can see several email addresses listed - SIM, SMTP and smtp. Is there a way to get all of these? I know how to get the primary email address using:
recipient.AddressEntry.GetExchangeUser().PrimarySmtpAddress
which always seem to give the email address marked "SMTP". I want "smtp" and "SIP" email addresses too. This is Outlook 2010 connected to Exchange server and all users are exchange users only.
Thanks in advance Vikram
回答1:
Got the answer! Thanks to MethodMan for pointing in the right direction.
const string PR_EMS_AB_PROXY_ADDRESSES = "http://schemas.microsoft.com/mapi/proptag/0x800F101E";
var addresses = recipient.AddressEntry.PropertyAccessor.GetProperty(PR_EMS_AB_PROXY_ADDRESSES);
That gives the list of all available addresses for a contact!
来源:https://stackoverflow.com/questions/35410811/how-to-get-all-addresses-of-a-recipient-in-outlook-using-net-c