Search code examples
node.jsgmailsendmail

Error: connect ETIMEDOUT 55.28.36.18:587 at TCPConnectWrap


I'm sending email using nodemailer. I just follow the sample here. But I got error like below.

Error: connect ETIMEDOUT 55.28.36.18:587

at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16) {

errno: -4039,

code: 'ESOCKET',

syscall: 'connect',

address: '55.28.36.18',

port: 587,

command: 'CONN' }

I tried to change port number and other things but can't fix this.

Please tell me what's wrong with my code.


Solution

  • You should check your proxy settings first. Some of these errors are due to proxy setting. The sample you followed is working fine on my side.