Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Make HTML pages email-safe
branch: master

update deps

latest commit e6556f42be
@crcn authored
Failed to load latest commit information.
bin Add ablitity to keep comments. Fix dependency.
examples/test-1 cleaned up testing response
lib Add ablitity to keep comments. Fix dependency.
.cupboard initial commit
.gitignore set jsdom version to 0.2.10
.npmignore update deps
.travis.yml :gem: Added travis.yml file :gem:
LICENSE.txt initial commit
makefile start on web support
package.json update deps
project.sublime-project initial commit
project.sublime-workspace various fixes

build status

Emailify makes your html documents a bit more email-safe

This is the node.js version of premailer.


HTML Example

Turns this:

            h4 {
                color: #ff6600;
        <h4>orange header</h4>

Into this:

        <h4 style="color: #ff6600;">orange header</h4>

Testing Compatibility Screenshot

Alt command line



npm install emailify -g

Command Line


-i [input_html] -o [output_html]

  -i, --input    [required]
  -o, --output  
  -t, --test     [default: false]
  -c, --comments [default: false]

To emailify a document, use this command:

emailify -i /my/html/file.html -o /my/html/emailified.html

If you intend to keep comments, do the following:

emailify -c true -i /my/html/file.html -o /my/html/emailified.html

You can easily test a document for compatibility by adding the -t flag:

emailify -i /my/html/file.html -o /my/html/emailified.html -t

Ommit -o if you just want to see what emailify produces:

emailify -i /my/html/file.html

Node.js API

.parse(content[, options], callback)

parses html content into email-safe html

  • content - the html content
  • options
    • test - runs test against code for compatibility
var emailify = require('emailify'),
fs           = require('fs')

emailify.parse(fs.readFileSync('/my/email/newsletter.html', 'utf8'), function(err, content) {
    //send newsletter

.load(file[, options], callback)

loads a html file

var emailify = require('emailify'),
fs           = require('fs')

emailify.load('/my/email/newsletter.html', { test: true }, function(err, content, warnings) {
    //send newsletter
Something went wrong with that request. Please try again.