1.0.16 • Published 2 years ago
flowmailer v1.0.16
Flowmailer
Typescript ready NPM package for Flowmailer API interaction.
Step #1
Create an instance
const mailer = new Flowmailer({
clientId: '<your-flowmailer-client-id>',
clientSecret: '<your-flowmailer-client-secret>',
transport: {
host: 'smtp.flowmailer.net',
auth: {
user: '<your-flowmailer-smtp-user>',
pass: '<your-flowmailer-smtp-pass>',
},
},
});
Step #2
Send emails
mailer.sendEmail({
// custom flowmailer props
flowmailer: {
templateId: <your-template-id>,
// template data keys get replaced with values
templateData: {
prop1: 'value-1',
prop2: 'value-2',
},
},
// normal nodemailer props
from: '"Fred Foo 👻" <.....@gmail.com>',
to: '.....@gmail.com',
subject: 'Hello ✔',
});