Report this

What is the reason for this report?

Why can't I send emails from my Droplet? Port 25 is blocked

Posted on May 9, 2026

I set up a Node.js app on a DigitalOcean Droplet and configured Nodemailer to send transactional emails directly via SMTP. Everything looks correct in the code but emails are not going out and I am getting connection timeout errors.

After some digging I found that port 25 is not reachable. Is this a firewall issue on my end, or does DigitalOcean block this by default? And if so, what is the recommended way to send emails from a Droplet?



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.

Hey 👋

Yep, default SMTP ports like 25 are blocked by default on new accounts to prevent abuse. Even though you’re using authenticated Gmail SMTP, the block still applies.

https://docs.digitalocean.com/support/why-is-smtp-blocked/

Your best bet is to either:

  • Reach out to DigitalOcean support and ask if they can review your account and unblock it (they don’t always do it, but worth a try),

  • Or use a service like smtpfa.st, SendGrid, Mailgun, or Postmark, much better for deliverability anyway. They allow SMTP over API, which is a good workaround and better for performance too.

Some SMTP providers also support alternative ports like 2525, I know that smtpfa.st offers that bt you might want to check if Gmail does (last I checked, it doesn’t, but maybe worth double-checking).

Let me know how it goes!

- Bobby

Heya, @1636b10487fe4ab5b1e3bc483fd84f

Port 25 is blocked on new accounts to prevent SPAM. You can check this article for more information

https://docs.digitalocean.com/support/why-is-smtp-blocked/

You can use third party providers like smtpfast, mailgun, sendgrid and etc.

Regards

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.