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 👋

Yep, outbound SMTP is restricted by default on many new DigitalOcean accounts to prevent abuse. Even if you’re using authenticated Gmail SMTP, the block can still apply, which is why port 587 and 465 are timing out while ping works.

This explains it in more detail: https://docs.digitalocean.com/support/why-is-smtp-blocked/

Your options are basically:

  • Reach out to DigitalOcean support and ask them to review your account and unblock outbound SMTP (they sometimes do, but it’s not guaranteed).

  • Use a transactional email service like SendGrid, Mailgun, or Postmark. These are generally better for deliverability and often work via API or alternative SMTP setups.

Let me know how it goes.

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.

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.