1 const nodemailer = require('nodemailer');
3 module.exports = function(email, subject, content, cb)
5 // create reusable transporter object using the default SMTP transport
6 const transporter = nodemailer.createTransport({
7 host: "smtp_host_address",
8 port: 465, //if secure; otherwise use 587
16 // setup email data with unicode symbols
18 from: email, //note: some SMTP serves might forbid this
24 // send mail with defined transport object
25 transporter.sendMail(mailOptions, (error, info) => {
28 // Ignore info. Option:
29 //console.log('Message sent: %s', info.messageId);