Nodemailer engine for universal mailing-nodemailer.
npm install @universal-packages/mailing-nodemailer
# If using SES
npm install @aws-sdk/client-ses
npm install @aws-sdk/credential-provider-node
import { Mailing } from '@universal-packages/mailing-nodemailer'
import { NodemailerEngine } from '@universal-packages/mailing-nodemailer'
const mailing = new Mailing( engine: 'nodemailer', engineOptions: { transport: 'smtp', options: { host: 'smtp.com'} })
await mailing.prepare()
mailing.send({ subject: 'Email', extra: { headers: { HEADER: 'header' }}, from: 'universal@dev.com', to: 'david@packages.com', template: 'templates/email', locals: { name: 'Omar' } })
-
transport
smtp | ses
default: smtp
Usesmtp
to all kind of configurations orses
to automatically set it up and just pass options rafted to ses. -
options
Object
All configurations available for transports.SES options:
-
apiVersion
String
-
region
String
-
This library is developed in TypeScript and shipped fully typed.
The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.