Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save webdelin/260559e2d7b7a22cd9ef7ddf09756d72 to your computer and use it in GitHub Desktop.

Select an option

Save webdelin/260559e2d7b7a22cd9ef7ddf09756d72 to your computer and use it in GitHub Desktop.
const nodemailer = require('nodemailer')
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: '[email protected]',
pass: 'passPASS'
}
});
const mailOptions = {
from: '[email protected]', // sender address
to: '[email protected],[email protected]', // 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