Get Exchange user PrimarySmtpAddress for DisplayType olForum

北城以北 提交于 2019-12-11 21:15:59

问题


From an AddressEntry instance I'm calling GetExchangeUser or GetExchangeDistributionList methods to get PrimarySmtpAddress. This works fine when the AddressEntry has a DisplayType of olUser or olDistList, but both return null for an address with DisplayType of olForum.

The Exchange address does have an associated SMTP address. In Outlook I can type the address into "To" on a new email and it resolves to the appropriate Exchange user. Double-click on the user and an SMTP address does show. I just can't find a way to get to it through the Outlook object model.


回答1:


If the SMTP address is available on that address entry, you should be able to retrieve it using AddressEntry.PropetyAccessor.GetProperty.
Take a look at that address entry using OutlookSpy - if you already have a message with that GAL entry as one of the recipients, select it in Outlook, click IMessage button on the OutlookSpy ribbon, go to the GetRecipientTable tab, double click on the recipient.
Do you see PR_SMTP_ADDRESS property? How about PR_EMS_AB_PROXY_ADDRESSES?



来源:https://stackoverflow.com/questions/19443087/get-exchange-user-primarysmtpaddress-for-displaytype-olforum

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!