How Can I Get SMTP Addresses Of All GAL Entries?

D

dryer

I've tried using CDO but I can only get the SMTP address of the CurrentUser.
I've got code that iterates throught the GAL but all I get is distinguished
names. It there anyway to get this converted to an SMTP address?
 
D

dryer

I've tried using that, it only works for the CurrentUser, all other
AddressEntries give an "MAPI_E_NOT_FOUND" error.
 
D

Dmitry Streblechenko

Are you using Outlook 2003 in the cached mode? PR_SMTP_ADDRESS is not
downloaded by the offline address book provider.
Try the PR_EMS_AB_PROXY_ADDRESSES (0x800F101E) property - it will return an
array of all proxy addresses. The default SMTP address will be prefixed by
"SMTP:" (note that caps).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
D

dryer

No, I have Outlook 2000 SR-1. I gave PR_EMS_AB_PROXY_ADDRESSES a try but it
returns the error '[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]'.
 
D

Dmitry Streblechenko

What is your code and what do you get for PR_ADDRTYPE?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

dryer said:
No, I have Outlook 2000 SR-1. I gave PR_EMS_AB_PROXY_ADDRESSES a try but
it
returns the error '[Collaboration Data Objects -
[MAPI_E_NOT_FOUND(8004010F)]]'.

Dmitry Streblechenko said:
Are you using Outlook 2003 in the cached mode? PR_SMTP_ADDRESS is not
downloaded by the offline address book provider.
Try the PR_EMS_AB_PROXY_ADDRESSES (0x800F101E) property - it will return
an
array of all proxy addresses. The default SMTP address will be prefixed by
"SMTP:" (note that caps).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Top