Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@thorwurtzner/nodemailer-template

An easy to use template for sending mails with the use of nodemailer

nodemailer, mail, sendmail

readme

Nodemailer Template

How to install

npm i @thorwurtzner/nodemailer-template

Setting it up

Create a file named .env and paste this

EMAIL = "your-email-here"
PASS = "your-email-password-here"

The import is all ready in the script, and ofcourse keep your .env a secret, don't publish it!


How to use

var nodemailerTemplate = require("@thorwurtzner/nodemailer-template")

nodemailerTemplate(
    // From
    "email@hotmail.com",

    // To
    "email@gmail.com",

    // Subject
    "This is subject text",

    // Text
    "This is email text"
)

Run your file in node, and the email will send by gmail!