Report this

What is the reason for this report?

Cannot send mail using SMTP from Droplet

Posted on October 20, 2019

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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.