Convert html to eml
Introduction to html2eml
Each of these methods have pros and cons and are summarized in the table.
You can download a zip file in eml format uploading a file that contains the html and images.
How to convert from html to eml
- The zip files must contain:
- Just one file with extension htm o html (that contains precisely the html 's email).
- All images ( jpg,png,gif format) in the message, referenced in the html file.
|Spam||more likely||less likely|
|sending time||short (it only sends html)||long (for each mail you send the img)|
|Email Client||they block external images (ask permission to download)||They show images directly|
|Tracking||simple, just check the download img||other methods|
- Inside the zip, in the same level as the html file (no folders), the images must have the same extension of the real format (a 'png image format can not be called img.gif).
- Images must have an identical name to the reference contained in the html.
If the html contains :
would be the same.
The important thing is to have in a zip archive an image file in gif format called just bg.gif
html tags, attributes and css in relation to the images
Inside the eml file will be included pictures which are located in:
- tag 'img' attribute 'src'
- All tags with attribute 'background'
- will be removed from the html file the rules of CSS 'background' and 'background-image' (head and inline)
Some email clients like Outlook and Hotmail does not properly support the HTML attribute 'background' so I do not recommend using it.
We decided to remove the CSS rules that specify a background, because they work only on a few clients and with external references (http://).
With reference to the image embedded (thus eml), the background would not be viewed from almost any client.
The few clients that support CSS, finding a reference to an embedded image that can not handle, would give priority to CSS rules not even displaying the background set in the attribute 'background' if it exists.
Eml with alternative text
A good rule is to include in the e-mail alternative text.
This practice has two advantages:
- People who use mail clients that do not support html, can read the message
- The message is more likely to pass through spam filters and be delivered
To obtain a eml file with alternative text, simply insert in the zip package a file with extension txt.
MIME encoding used
Select a zip file from your disk and convert the files to eml
This web page does not work with internet explorer. Please use firefox or chrome.