Friday 28 February 2020

Getting connection timeout and ETIMEOUT errors with nodemailer to gmail with OAuth

I am getting ”Error: connect ETIMEOUT” and ”Error: Connection timed out” errors when sending email with gmail on nodemailer. My settings are fine with gmail OAuth, and ive used this setup before, and it has worked great, I havent changed anything. I have the client id and the client secret and refresh token. My target address for it is smtp.gmail.com, and the secure option is enabled and the port is 465, and pooling is enabled to 5 connections.Now all of the sudden im getting these errors. Ive literally changed nothing. And the funny thing is, ive been getting these errors for the past week AND NO EMAILS HAVE BEEN SENT SUCCESSFULLY, and now IVE CHANGED NOTHING! And its suddenly working again. If working counts as only 1/10 of emails fail.Ive not used my OAuth api that I use with the gmail setup of nodemailer basically not much at all, and ive enabled the highest free limits, and I also have GSuite on that account, which might also be making my API limits bigger. Ive sent literally like probably/tried to send around 140 emails a week, tops. The api limit is 2000 a day from what I remember. Its clearly not that.What the heck is the problem? It seems seemingly random, this happens with both smtp.googlemail.com and smtp.gmail.com. My pings to the addresses work fine. It does seem like a rate limit, but thats impossible, because there shouldnt be any rate limit like that.Has anyone had this issue? I have no idea what to do about it. I have firewalls yes, but they shouldnt be causing this, ive checked many times, AND IF THE FIREWALLS WHERE CAUSING THIS, theyd be blocking everyrhing! It would never work!Thanks in advance for any help.

Submitted February 28, 2020 at 08:30PM by livinglibary

No comments:

Post a Comment