send email using nodemailer and it should not block the next lines of code 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);
});