I am new to nodejs and try to send mail from nodemailer module but it has error i.e "Unsupported configuration, downgrade Nodemailer to v0.7.1 to use it
".
Here is my code:-
var nodemailer = require('nodemailer');
var mailTransport = nodemailer.createTransport('SMTP', {
service: 'Gmail',
auth: {
user: 'xxxxxxxx@gmail.com',
pass: 'xxxxxxxxx',
}
});
mailTransport.sendMail({
from: '"ABC" <info@xxxx.example.com>',
to: 'abcsss@xxx.example.com',
subject: 'Test',
text: 'Thank you for contact.',
}, function (err) {
if (err)
console.error('Unable to send email: ' + err);
});
To use nodemailer v1, try to implement this code.
You can try this one with Nodemailer V0.7.1. It worked for me.