man

mandible

html and txt email templates with handlebars

Showing:

Popularity

Downloads/wk

1

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

2

Size (min+gzip)

298.6KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

mandible

html and txt email templates with handlebars

var Mandible = require('mandible');

var mandible = Mandible('/path/to/email/templates')

// render this named template with the given locals
// name is resolved to '/path/to/email/templats/name.txt' and 'name.html'
mandible.render(name, locals, function(err, text, html) {
    // send email with text and html body parts
});

Layouts

By default, each template is rendered into a layout.txt or layout.html file in the email templates directory. Use the {{{body}}} syntax to indicate where in the layout the child template should be inserted.

Stylesheets

The juice module is used to inline the stylesheet into the html template for portability across email clients.

Just reference the stylesheet file in the layout.html as such

link rel="stylesheet" href="style.css" />

LICENSE

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100