Mailr
Nodemailer
A fluent mail library for NodeJS based onThe goal of Mailr is simple : create and send emails by fluent-way with NodeJS.
Basic example :
NodeJS :
const Mailr = // Example with Gmail SMTP serviceconst mailr = transporter_options: service: 'gmail' port: 465 secure: true host: 'smtp.gmail.com' auth: user: 'email.address@gmail.com' // Here your Gmail address pass: 'mysecurepassword' // Here your Gmail password mailr
Nunjucks by default) :
Template (with {{ title }} {{ content }}
Example with attachment :
NodeJS :
const options = mailer: template_path: './templates' transporter_options: service: 'gmail' port: 465 secure: true host: 'smtp.gmail.com' auth: user: 'email.address@gmail.com' // Here your Gmail address pass: 'mysecurepassword' // Here your Gmail password message: default_from: 'No-reply <no-reply@local.dev>' const email = optionsconst message = email message