Digital Ocean & Mailgun Setup Issue

Hi everyone, jumping in here with updates for 2025 that would have saved me a bunch of headache the past couple of days.

According to support at Digital Ocean on April 5, 2025:

We appreciate you for providing additional details in this regard and we completely understand your concern regarding SMTP port restrictions on your account. However, as of March 6, 2025, our security team has blocked SMTP ports 465 and 587 along with port 25 that was blocked previously as a preventive measure against spam and abuse.

You can find more details in our release notes here:

Droplets Release Notes :: DigitalOcean Documentation

We also realise that you have an application requirement or a business need to enable port 465 and 587 but due to our current policy we are unable to facilitate requests to remove the restriction on this port. We recommend utilising alternative ports if your application allows, such as port 2525. You can also use REST API with SendGrid, which allows you to send emails via HTTP requests instead of the traditional SMTP protocol if it is suitable for you or make use of another third-party sending service.

I was finally able to get my droplet working with the following config within mail - the port and requireTLS setting are different from what sunknudsen mentioned in Jan 2022:

{
  "mail": {
    "from": "John Doe <john@example.net>",
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
        "port": 2525,
        "requireTLS": false,
      "secure": false,
      "auth": {
        "user": "postmaster@example.net",
        "pass": "…"
      }
    }
  }
}
3 Likes