nodemailer-campaigner-transport-esm
v1.0.1
Published
A nodemailer transport plugin for sending transactional emails with Campaigner
Downloads
3
Maintainers
Readme
nodemailer-campaigner-transport-esm
What is this?
nodemailer is a handy module for sending emails with Node.js using a variety of third party plug-and-play transports. This is the transport plugin for sending email with Campaigner.
Installation
$ npm install --save nodemailer nodemailer-campaigner-transport-esm
Example Usage
import { createTransport } from 'nodemailer';
import CampaignerTransport from 'nodemailer-campaigner-transport-esm';
const mailer = createTransport(
new CampaignerTransport({
apiKey: 'key-1234123412341234',
relaySendCategoryId: '1234'
})
);
mailer.sendMail({
from: '[email protected]',
to: '[email protected]', // An array if you have multiple recipients.
cc: '[email protected]',
bcc: '[email protected]',
subject: 'Hey you, awesome!',
html: '<b>Wow Big powerful letters</b>',
text: 'Mailgun rocks, pow pow!'
});