Report this

What is the reason for this report?

Request to Unblock Outbound SMTP Ports 587 and 465

Posted on December 27, 2025

I am currently hosting a web application on a DigitalOcean Droplet and need to send emails using Gmail SMTP.

However, my server is unable to establish a connection to smtp.gmail.com on ports 587 and 465. When I run the following command: telnet smtp.gmail.com 587

the connection times out. At the same time, ping smtp.gmail.com works correctly, which indicates that the network itself is reachable.

This issue is preventing my deployed website from sending transactional emails. I understand that outbound SMTP traffic may be restricted by default, so I would like to request that outbound SMTP access on ports 587 and 465 be unblocked for my Droplet.

Please let me know if you need any additional information from my side to proceed with this request.

Thank you.



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!

Yes, the SMTP ports (25, 465, and 587) are blocked on all Droplets for new accounts to prevent spam and other abuses:

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

Even if SMTP were available, DigitalOcean strongly recommends against running your own mail server in favor of using a dedicated email deliverability platform. Dedicated email deliverability platforms are better at handling deliverability factors like IP reputation.

To send mail from DigitalOcean, they recommend using an SMTP service like SendGrid or https://smtpfa.st/ or any other reliable SMTP service.

Alternatively, you could reach out to the DigitalOcean support team and check if they could lift the block for you but in many cases this is not possible:

https://www.digitalocean.com/support/

Another option is to use a non-standard SMTP port like 2525 for example if your SMTP provider allows it.

Heya, @tiendung02

SMTP ports 25, 465, and 587 are blocked on Droplets to prevent spam and other abuses on our platform. This block applies to all Droplets by default and includes traffic passing through a Reserved IP address.

Even if SMTP were available, we strongly recommend against running your own mail server, as self-hosted mail servers are difficult to secure and maintain, frequently get flagged as spam, and require constant monitoring to protect your IP address. Dedicated email platforms manage these challenges for you.

To send mail from services hosted on DigitalOcean, we recommend using a third-party email as a service provider.

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.