Decode EML Files
Sometimes an E-mail file will not be properly processed by your E-mail client and you are left with a mail that has an attachment .EML file. This file is the complete text of the sent E-mail but if there were attachments these will be encoded and appear in the file as random text.
Some E-mail clients will allow you to import these files and then automatically handle them showing you both the message and allowing you to use the program to handle the attachments. Some may not. It's those that this FAQ addresses.
To work with these files you need to do two things:
Open the EML file in your text editor. The first part of the file should be the mail headers followed by the text version of the E-mail body and then, perhaps, a second section which shows the same E-mail messsage but with HTML tags for a rich-text display. The text of the message should be able to be easily read in the text editor. It's the attachments that you need to decode to see.
Scroll down through the EML file and you should see several boundary markers. They will look something like this...
...the boundary between the ASCII text version of the E-mail and the HTML version. If the attachment is an image the boundary might look something like this...
Note that this boundary header says the following material is a JPEG image named 080605ML1.jpg and that the material is base64 encoded; a standard encoding used for E-mail attachments.
What you want to do is copy all the random-looking text following the boundary down to the next boundary into the dialog box displayed when you start the b64dec program. Once you do that and give a name to the recovered file just click on the Decode button and a file of the name you specified should appear in the program folder (or any other folder you specified when you named the file).
Once you've done that, go back and extract the remaining attachments from the original EML file; one attachment at a time.
Confused? Perhaps a movie would help...