simple-node-mailer
v1.0.2
Published
Simple Node Email Library
Downloads
4
Readme
Simple Node Mailer
Simple promise wrapper for nodemailer
npm package.
Installation
npm install simple-node-mailer
Usage
const { sendMessage } = require('simple-node-mailer');
const serverOptions = {
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth: {
user: '[email protected]',
pass: 'securePassword',
},
};
const mailOptions = {
to: '[email protected]',
subject: 'Subject here',
text: 'Body of email here',
};
const info = await sendMessage(serverOptions, mailOptions);
console.log('SMTP response: ' + info.response);