Jump to content

Parse an Outlook Email


Kyprus

Recommended Posts

I found something similar on Experts Exchange..

 

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20274682.html

 

"Well, at home I use Outlook Express and Express will store emails in the .EML format which is just plain text. The Outlook .MSG file format however is a binary format which is probably a structured storage format. You might be able to read it if you know about COM+ and structured storage.

What you need to look into is the IStorage object combined with the StgOpenStorage API function and other storage related omethods and objects. Using this you might discover that the .MSG format holds a lot of valuable information once you've succesfully read the contents.

 

Actually, that's the difference between the .EML format and the .MSG format. The EML stores the email in it's raw format while the MSG stores it as an object. Which is quite nice but it makes the MSG format unreadable unless you use IStorage to read it's contents.

 

If you want to read a .MSG file, you'll have to learn a lot about COM. It's not too difficult but it's a lot of information and it overwhelmes inexperienced developers."

 

There is actually a lot of helpful information in that thread.

Link to comment
Share on other sites

Thanks for the reply. So maybe an easy way to do this would be to first convert the email to a .eml? I found a class that will parse a plaintext MIME message and grab the attachments.

 

So I've been looking for a way to convert the email but once again can't find anything useful.

 

I'm surprised this isn't a more common thing.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.