Create Outlook 2003 Account programmatically

Posted on 2004-10-17
Last Modified: 2013-12-03

For a project i am working on, I need to be able to set up an Outlook 2003 email account programatically. This is not for an Exchange Server account, just a simple POP3 email account. Preferably setting the password aswell, but if this is not possible, simply the account without password would be sufficient.

I need a solution compatible with WIN32 C/C++. For an Outlook Express account, you can simply create registry settings to achieve this, and similar for Outlook 2000, but I have had no success for Outlook 2003.

If anyone could provide information/solution to this problem, I would be most greatful.

Question by:habadacus
  • 2
LVL 16

Accepted Solution

nonubik earned 500 total points
ID: 12337395
The regkeys about an Outlook profile are under
HKCU\\software\\microsoft\\windows nt\\currentversion\\windows messaging subsystem\\profiles
There are bunch of keys there.

What you need to modify:
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook2\9375CFF0413111d3B88A00104B2A6676]
 - there is a value {ED475418-B0D6-11D2-8C3B-00104B2A6676}, REG_BINARY. Here you have to add a new account id, an int as binary (4 bytes). You can choose the greatest account id existent + 1. The {ED475418-B0D6-11D2-8C3B-00104B2A6676} value holds a list of account ids as integers.

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook2\9375CFF0413111d3B88A00104B2A6676]
 - create a key having your new account id, padded with zeros (i.e. your account id is 5, you need to create a key "00000005").
 - under it you have to create some values:
"clsid"="{ED475411-B0D6-11D2-8C3B-00104B2A6676}" //POP3 clsid
"Mini UID"=dword:7665f469  //?? don't know exactly what is
"Account Name"=hex:7a,00,7a,00,7a,00,2e,00,67,00,69,00,67,00,69,00,38,00,2e,00, 63,00,6f,00,6d,00,00,00  //this should be the account name in UNICODE (e.g.
"Display Name"=hex:7a,00,7a,00,7a,00,7a,00,00,00 //this should be the display name in UNICODE (e.g. 'zzzz')
"Email"=hex:7a,00,7a,00,7a,00,40,00,67,00,69,00,67,00,69,00,2e,00,63,00,6f,00, 6d,00,00,00 //idem, UNICODE (e.g. '')
"POP3 Server"=hex:7a,00,7a,00,7a,00,2e,00,67,00,69,00,67,00,69,00,38,00,2e,00, 63,00,6f,00,6d,00,00,00 //pop3 server address, UNICODE (e.g.
"SMTP Server"=hex:7a,00,7a,00,7a,00,2e,00,67,00,69,00,67,00,69,00,38,00,2e,00, 63,00,6f,00,6d,00,00,00//smtp server address, UNICODE (e.g.
"POP3 User"=hex:7a,00,7a,00,7a,00,00,00

Author Comment

ID: 12344423
Thankyou very much, your help is appreciated.

I have accepted your answer, but as an aside, do you or anyone know how to write the password here? I am familiar with the Protected Storage Model used by Outlook Express, but a heads up on the password system here would be appreciated. If someone wants points for this additional question, im more than willing to post this as a new Q.

Cheers again,

LVL 16

Expert Comment

ID: 12345022
The only thing I know right now is that it's written under the "POP3 Password" value and it's binary, encrypted. I'll dig more for you...

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question