Created
June 14, 2019 22:32
-
-
Save webdelin/260559e2d7b7a22cd9ef7ddf09756d72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nodemailer = require('nodemailer') | |
const transporter = nodemailer.createTransport({ | |
service: 'gmail', | |
auth: { | |
user: 'in@gmail.com', | |
pass: 'passPASS' | |
} | |
}); | |
const mailOptions = { | |
from: 'ext@gmail.com', // sender address | |
to: 'in@gmail.com,in2@gmail.com', // list of receivers | |
subject: 'Subject of your email', // Subject line | |
html: '<p>Your html here</p>'// plain text body | |
}; | |
transporter.sendMail(mailOptions, function (err, info) { | |
if(err) | |
console.log(err) | |
else | |
console.log(info); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment