@universal-packages/mailing-nodemailer
v1.0.28
Published
Nodemailer engine for universal mailing-nodemailer.
Downloads
37
Readme
Mailing Nodemailer
Nodemailer engine for universal mailing-nodemailer.
Install
npm install @universal-packages/mailing-nodemailer
# If using SES
npm install @aws-sdk/client-ses
npm install @aws-sdk/credential-provider-node
NodemailerEngine
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: '[email protected]', to: '[email protected]', template: 'templates/email', locals: { name: 'Omar' } })
Options
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
Typescript
This library is developed in TypeScript and shipped fully typed.
Contributing
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.