punkave/send-html-email

Name: send-html-email

Owner: P'unk Avenue

Description: Send an HTML file as an email message with the right content type, for testing email clients

Created: 2016-03-04 21:43:54.0

Updated: 2018-01-23 13:16:46.0

Pushed: 2017-05-23 16:17:02.0

Homepage: null

Size: 3

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

send-html-email

install -g send-html-email

-html-email me@example.com mytestfile.html

send-html-email is a command line tool that emails the given file to the given address with the correct content type so it renders as an HTML email message. This tool is intended for faster testing of HTML email templates on real devices. It is not intended for bulk email delivery. The “from” and “to” addresses will be the same. The message will almost certainly wind up in your spam folder. Consider using a filter to prevent that.

For instance, if you're testing gmail, it's easy to filter messages to an address like this one:

-html-email me+testmail@example.com mytestfile.html

Set up a filter to never send messages with +testmail in the address to spam, and you're good to go.

Also consider options like litmus. This is vastly cheaper, plus in gmail you can actually hit “Inspect” this way. But you probably don't own every device in the world.

Limitations

This is for testing email templates. If you want to send email in a production way, check out nodemailer.

send-html-email always uses the sendmail nodemailer transport. On Windows, that won't work. Pull requests welcome.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.