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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.