Error: connect ECONNREFUSED 127.0.0.1:465 nodemailer
Thank you for your time guys. Below is what works for me .
nodemailer.createTransport('smtps://user%myDomain.com:[email protected]');
changed to
var smtpConfig = {
host: 'smtp.gmail.com',
port: 465,
secure: true, // use SSL
auth: {
user: '[email protected]',
pass: 'pass@pass'
}
};
var transporter = nodemailer.createTransport(smtpConfig);
I Found the example above on the doc https://github.com/nodemailer/nodemailer . I am suspecting this may happened to you if your password contained @
symbol considering u and the smtps link. Its therefore advisable to split it into an object without the @ symbol interfering with your smtps url. This is my guess thought. Nonetheless the above solution works for me. Plus don't forget to allow less secure apps from your google console.