Question

Cannot send mail using SMTP from Droplet

Posted October 20, 2019 716 views
Applications

I’m using nodemailer to send gmail from my Nodejs Application. It worked well on my local, but after push it to server it had error timeout. I think problem is Droplet blocked port 465, so my application fail to send mail. Please help me to resolve this.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @jackynguyen93,

Are you sure there is a service listening on port 465? Please provide me with the result of the command

netstat -tulpen | grep 465

Additionally, can you please provide me with the configuration file of your application?

An Alternative would be just as you mentioned the port being blocked for outgoing connections. To allow outgoing connections from your server to server2 on TCP port 465, use this on your server :

iptables -A OUTPUT -p tcp -d <server2ip> --dport 465 -j ACCEPT

Regards,
KDSys

Submit an Answer