This code was written to provide an initial example of the IStoreFolder / IStoreNamespace classes. Then, an example of IMimeMessage / IMimeMessageTree / IMimeBody / IMimePropertySet was added to the application. The idea of this article is to document, with a complete example, all these interfaces to show how Outlook Express storage could be accessed.

In the initial dialog, all the local folders of the main identity are listed to let the user modify them. In the message dialog, you will see all the messages of the selected folder. Identifying the message source and other operations can be done here. In the 'Bodies' dialog, you will be able to view the message structure and modify it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

Share

About the Author

Pablo Yabo is a Software Developer since he was young, specialized in system internals.
In 2003 years ago founded with Sebastian Wain a Company named Nektra specialized in Outlook Express and Outlook Plugin Development.
Now there is a new Windows Live Mail API 2011 / 2009 that works on all the platforms Windows 7, Vista and XP

Hi, sorry to interrupt you. I am really feazed by the coding on the outlook express.
I am developing my application using C++ with the help of NKT WAB .And i've downloaded the NKT WAB V2.1.0 Source Code.
I appreciated you so much for your great work!!

The problem is that i don't know how to add contacts into my OE group in my application,
although i see in the source code that it is appending the EntryId of the existing contact to the DistList.
Now i can get the DistributionListArray by the property of PR_DISTLIST_ENTYRIDS and then create the new "lpProp" of LPSPropValue type.
So how can i set the new "lpProp" as the value of the tag "PR_DISTLIST_ENTRYIDS" of my OE group?

In the source code, it is done by "SetField(lpProp)" and i am puzzled by the global varialbe "_changeProps" of "PropMap" type in the function of SetField();
because i can't find any initalization of the varialbe "_changeProps" in the context. Is it releate to COM? but i know little about it....
So the key is that how can i retrieve "_changeProps" ?
if i get it, maybe i can i set the new "lpProp" as the value of the tag "PR_DISTLIST_ENTRYIDS" of my OE group.
Addtional, it failed when i use "lpDistList->SetProps(1, lpProp, NULL)" ;

So could you please give me anytips or methods about that?
I’m hopeful you can help my out, and any support is appreciated.
Thanks again and best wishes to you. ^_^

Now I know outlook express uses "windows Address book". Now can anyone tell me, is there any wrapper/extension through which I can access both mapi clients(Outllok 2007 and later versions) and outlook express (windows address book client)

i was using this code to delete message from outlook express , in windows mail upto finding duplictae (scnning msg from selected folder and deleting =code added by me) was working fine but when it come to delete it gives error ,E_INVALIDARG is return value of deletemessge function.

this is realy important to me

Please advise .
note: in same type of question it is advise to change flag of message but setflag function do not have value specified in solution

Hi,
If you call DeleteMessages with the first parameter 1 (to delete permanent) that doesn't work in Windows Mail. Using 0 in the first parameter works but to use 1 you need an additional interface to pass in the third parameter.

I ran the demo application on a Windows XP system that has two Outlook Express identities, each protected by a password. The demo didn't need the password to access the mail belonging to the main identity.
Two questions:
- Any idea what to change in your code to make it password-sensitive?
- Any idea how to switch to another identity?

- Any idea what to change in your code to make it password-sensitive?
No at all!

- Any idea how to switch to another identity?
I don't know a way to change the identity. You can spy windows messages to see what happen when the user chooses that menu item and simulate user input, but it won't be nice.

Pablo,
do you know how to access the windows Live mail or Windows Mail of Vista, messages and properties. Messages are ascii files but the properties of the messages such as read etc are not documented that I can tell.

Hi,
Windows Mail in Vista uses the same interfaces, it has some problems when you write email. I may include this issues in a new article in the future.
For Windows Live Mail there is are no public interfaces, we at Nektra recently researched the Windows Live Mail undocumented API and it's a bit complex to do an article to include all versions of the mailer. We notice changes even in minor releases.
Messages are text stored as Eml in a database but the properties are only in the database, they are not in the message itself. To access the properties you should use IStoreNamespace / IStoreFolder and there are some undocumented interfaces.
Pablo

I think that it shouldn't work from a service because it uses Ole that communicate with other processes through windows messages. Your service should have the flag that is able to connect with the desktop.
Pablo

In Outlook Express 6, there is an attribute "att:athena-server" which contains the domain from which the message was received.
However I don't see it windows vista. I see Windows Mail does display the account from which the message was received, so they do keep the account info. In addition, in the message storage (in the edb file under Windows Mail) I do see the domain too.

Is there a way to get the domain?
I was thinking maybe they save it as Unicode, but I was not able to get the IMimeMessageW to work (which would allow me to use GetPropW). I did not find that interface in the registry, and I do have the inetcomm.dll version 6, which should have it.