A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

enumerate exchange email accounts



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 24th 08, 11:23 PM posted to microsoft.public.outlook.program_addins
spareway
external usenet poster
 
Posts: 11
Default enumerate exchange email accounts

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
  #2  
Old January 25th 08, 12:02 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default enumerate exchange email accounts

In Outlook 2007, use Namespace.Accounts colleciton. Account.SmtpAddres
should give you what you need
plug
In older version of Outlook, you can use the RDOSession.Account collection
in Redemption - see http://www.dimastr.com/redemption/rdo/rdosession.htm
/plug

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

"spareway" wrote in message
...
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



  #3  
Old January 25th 08, 06:31 AM posted to microsoft.public.outlook.program_addins
spareway
external usenet poster
 
Posts: 11
Default enumerate exchange email accounts

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

On Jan 24, 4:02*pm, "Dmitry Streblechenko" wrote:
In Outlook 2007, use Namespace.Accounts colleciton. Account.SmtpAddres
should give you what you need
plug
In older version of Outlook, you can use the RDOSession.Account collection
in Redemption - seehttp://www.dimastr.com/redemption/rdo/rdosession.htm
/plug

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

"spareway" wrote in message

...



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- Hide quoted text -


- Show quoted text -


  #4  
Old January 25th 08, 05:44 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default enumerate exchange email accounts

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

"spareway" wrote in message
...
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

On Jan 24, 4:02 pm, "Dmitry Streblechenko" wrote:
In Outlook 2007, use Namespace.Accounts colleciton. Account.SmtpAddres
should give you what you need
plug
In older version of Outlook, you can use the RDOSession.Account collection
in Redemption - seehttp://www.dimastr.com/redemption/rdo/rdosession.htm
/plug

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

"spareway" wrote in message

...



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- Hide quoted text -


- Show quoted text -



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with multiple email accounts on Exchange Server Tom Outlook - Installation 4 December 19th 07 05:27 PM
Multiple email accounts with Exchange Server? Tom Outlook - Installation 4 December 18th 07 10:32 PM
How do I setup multiple email accounts - Exchange & Imap? DC Outlook - Installation 7 December 15th 06 06:43 PM
Unattended setup of email accounts (no Exchange Server) news.sbcglobal.net Outlook - General Queries 4 October 9th 06 07:25 PM
watching multiple exchange email accounts -send from each? faithgirl Outlook - Installation 7 September 7th 06 08:30 PM


All times are GMT +1. The time now is 04:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.