I want to display a confirm message using HTML once I have sent an email via nodemailer. I am fairly new to node so I'm not sure if I'm missing something obvious.
app.post("/bye", function(req, res){
// send e-mail
var transporter = nodemailer.createTransport({
...
});
var mailOptions = {
...
}
transporter.sendMail(mailOptions, function(error, info){
if(error){
return console.log(error);
}
console.log('Message sent: ' + info.response);
... (Something here that is going to print a confirmation message to the html code of the page)
});
res.end("yes");
});
Thanks