@skulpture/mailedit v0.1.2
About
A wrapper around Nodemailer to send HTML emails
Uses Pug and Nodemailer to send HTML emails.
Usage
Install MailedIt
$: npm i -S @skulpture/mailedit
Import the makeMailedIt function
makeMailedIt
requires a configuration object which has the following interface:{ template: string, details: SenderDetails }
template
is the Pug template to usedetails
is the details of the SMTP server// In your TypeScript or JavaScript file
import makeMailedIt from '@skulpture/mailedIt'
const mailedIt = makeMailedIt(configuration)
Use the resulting MailedIt object
mailedIt.post(envelope, transform)
envelope
is the mail envelope you want to sendtransform
an optional function to transform the data to the shape required for the Pug template
Contribution
Contributions are welcome, just make a pull request