Principle
The .eml extension files are used for emails generated by Outlook, Outlook Express, IncrediMail, Windows' notepad, etc. They obey to the RFC-822 which defines multipart emails, i.e. emails containing pictures and HTML, as used in newsletters. The aim of those scripts is to display such files through a very light parsing.
Use
The .eml file is given in parameter, its name encoded like with the urlencode function (all non-alphanumeric characters except -_. are replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs), or hard-coded in the script. Two options are available for the pictures' display: either a direct display via a second script (default option), either saved as files in a directory.
Call
viewEML.php
The .eml file is hard-coded in the script, pictures are generated on the fly.
viewEML.php?images=filed
The .eml file is hard-coded in the script, pictures are saved in the '/img' directory.
viewEML.php?filename=eml_file_name
The .eml file is given in parameter, pictures are generated on the fly.
viewEML.php?filename=eml_file_name&images=filed
The .eml file is given in parameter, pictures are saved in the '/img' directory.
Source code
This application is public domain: you can download it and use it for whatever you will. If you bring any modification to it you wish to share, the new version will be added on this site. Main script (viewEML.php) and secondary script to display the images (viewImage.php).
Liens
Jason Cleeland from the Aptigence company in Melbourne, Australia, proposes a free PHP script to read, then display EML files including the capacity to extract and download attachments. You can find it at: Aptigence.
|