1.0.2 • Published 4 years ago

simple-node-mailer v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

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: 'username@gmail.com',
        pass: 'securePassword',
    },
};

const mailOptions = {
    to: 'myfriend@gmail.com',
    subject: 'Subject here',
    text: 'Body of email here',
};

const info = await sendMessage(serverOptions, mailOptions);

console.log('SMTP response: ' + info.response);
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago