Answers for "npm install nodemailer"

24

nodemailer

var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
 service: 'gmail',
 auth: {
        user: '[email protected]',
        pass: 'yourpassword'
    }
});
const mailOptions = {
  from: '[email protected]', // sender address
  to: '[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);
});
Posted by: Guest on September-29-2020
0

npm install nodemailer

npm i nodemailer
Posted by: Guest on June-09-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language