enumerate exchange email accounts

S

spareway

Hi,

I have a VS 2005 c# outlook addin that I have created. I need to
enumerate all email accounts for a profile. I have no problem reading
the registry to get the accounts. The entries in the registry for the
exchange accounts do not have an email address associated with them.
I have noticed that there is an Identity Eid key that has the
username. Is there a way for me to figure out the email addresses of
the exchange accounts from the registry info?

thanks,

craig
 
S

spareway

thanks for the suggestion Dmitry. Unfortunately I am targeting Outlook
2003 and cannot use a com based library.
Are there any MAPI calls I can use to get the email addrtess for the
account?

thanks,

craig
 
D

Dmitry Streblechenko

Keep in mind that Extended MAPI is not supported in the managed code.
If you need the identity of the primary mailbox, call
IMAPISession::QueryIdentity (wil return the entry id of the address entry
(IMailUser) corresponding to the current user),use the returned entry id to
call IAddrBook::OpenEntry, then read the PR_EMS_AB_PROXY_ADDRESSES property
to read all the proxy addresses (default SMTP address among them).
In case of POP3/SMTP accounts, use the IOlkAccountManager interface (you can
play with all of them in OutlookSpy).

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

thanks for the suggestion Dmitry. Unfortunately I am targeting Outlook
2003 and cannot use a com based library.
Are there any MAPI calls I can use to get the email addrtess for the
account?

thanks,

craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top