- var gomailer = require('gomail')
- var filepath=/path/to/nodemailer/config.json
- var transporter = gomailer.createEmail(filepath)
- var mailoption = gomailer.createMailOption();
- gomailer.sendEMail(transporter,mailOptions)
{
"host": "mail.itsapp.it",
"port": 587,
"auth": {
"user": "itsapp.it@gmail.com",
"pass": "passwords"
}
}
gomailer.createMailOption() creates the below json object. Modify the values and pass it to gomailer.sendEMail().
{
"from: "itsapp.it@gmail.com",
"to": "itsapp.it@gmail.com",
"subject": "Test invio email",
"text": "Test invio email",
"html": "<b>Test invio email</b>"
}