using node mailer how to send response to client in nodejs code example
Example: nodemailer
var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: '[email protected]',
pass: 'yourpassword'
}
});
const mailOptions = {
from: '[email protected]',
to: '[email protected]',
subject: 'Subject of your email',
html: '<p>Your html here</p>'
};
transporter.sendMail(mailOptions, function (err, info) {
if(err)
console.log(err)
else
console.log(info);
});