Socket
Socket
Sign inDemoInstall

emailah

Package Overview
Dependencies
345
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    emailah

** Consider this to be very experimental - do not use in production **


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Readme

Source

** Consider this to be very experimental - do not use in production **

Emailah

Given a path to an HTML file, returns a promise for a "mail" object suitable for sending via Nodemailer.

  • Subject is inferred from title tags
  • Image sources relative to the HTML file are automatically inline-embedded
  • Uses dust as a template engine
  • Uses juice for inlining CSS

Install

npm install emailah

Usage

Class: EmailTemplate

.constructor( templatePath )
.build( [dustContextVars], [defaultMailOptions] ) -> Promise object
.buildEML( [dustContextVars], [defaultMailOptions] ) -> Promise Buffer

Example

// create template from dust file
var t = require('emailah')("./template.dust");

// build the mail object used by the transport
t.build({ greeting: 'Hello' }, { to: "user@example.com" }).then(mail => {
    transport.sendMail(mail);
});

FAQs

Last updated on 16 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc