trt-packages
v0.0.3
Published
An service for common email sending
Downloads
2
Readme
Description
This is an small package for managing single source to send emails. It uses nodemailer in the background.
Installation
$ npm install trt-packages
Usage
For managing emails, import as,
import * as trt from "trt-packages";
OR
const trt = require('trt-packages');
Then use the below methods to set any transport and send emails
const transporter = await trt.email.setTransport(smtpConfig)
const sendEmail = await trt.email.sendEmail(transporter, mailOptions)
To send bulk emails, send the mailOptions
params in array else only object
Info
For more info on how to use other transports like aws ses, etc. or to know the structure of all objects passed, please refer nodemailer docs