How to get email from DBX files MS Outlook Express.
With using: Direct Parsing method, IStoreNamespace interface or Mailbox SDK API.
MS Outlook Express keeps copies of emails in the file with the extension DBX. Each MS Outlook Express folder with the emails stored in a separate file with the appropriate name, like 'Inbox.dbx', 'Outbox.dbx' for 'Inbox' and 'Outbox' folders. Often, you application may need to read these files contained copies of emails or retrieve files attached to them.
You can direct read and reviewed these files, using so-called parsing. Here are links to an article on how to parsing the contents DBX files:
You can use oficial Interface called IStoreNamespace ( http://msdn.microsoft.com/en-us/library/ms710214 (VS.85). Aspx ). Get access to copies of emails, but only in the default store, and have MS Outlook Express installed.
Please note that you come to work with this interface directly, filling the complex data structures.
To save a copy of the email from the current DBX files, you'll come around to comply with such actions:
Keep in mind that you have already opened a store using IStoreNamespace and listed all the folders inside (GetFirstSubFolder, GetNextSubFolder).
IStoreNamespace.OpenFolder (FolderId, 0, Folder); IStoreFolder.OpenMessage (MessageId, @IID_IStream, StreamIntf); IStream.Stat (Stats, 1); IStream.Read (@ Buff , BuffSize, @BytesRead); Stream.Write (Buff , BuffSize);
You can use Mailbox SDK API in your application:
In this program code is no COM objects and not fill the complex data structures.
DBXHandle = OpenMailbox ( 'FullPath and DBX file name' ); for FolderCount = 0 to GetFolderCount - 1 do GetFolderProp (DBXHandle, FolderCount, Folder); for MailCount = 0 to Folder.MailCount - 1 do GetMail (DBXHandle, FolderCount, MailCount, Mail);