{ Error: connect ECONNREFUSED 127.0.0.1:587 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) code: 'ECONNECTION', errno: 'ECONNREFUSED', syscall: 'connect',
address: '127.0.0.1', port: 587, command: 'CONN' }
const transporter = nodemailer.createTransport({
service: 'smtp.gmail.com',
auth: {
user: 'email',
pass: 'password '
}
});
I've switched on https://myaccount.google.com/lesssecureapps . What can it be ? I've tried ports - 465,25,463 ...it also isn't working . What should I do ?