What DigitalOcean blocks and why
DigitalOcean's support article on SMTP, last verified 13 July 2026, says ports 25, 465 and 587 are blocked on Droplets to prevent spam and abuse. The block applies to all Droplets by default and includes traffic passing through a Reserved IP. The article recommends a third-party email service provider for mail sent from services on its platform, and argues that self-hosted mail servers are hard to secure, often flagged as spam and need ongoing monitoring of the IP address.
The article does not describe a way to lift the block, does not name alternative ports and does not name providers. Plan as if the block is permanent. For a course site, the practical effect is that wp_mail() calls for enrollment confirmations, password resets, receipts and drip reminders fail silently if the site tries to send over a blocked port.
Routes that still work
| Route | Port | Blocked on a Droplet? | Notes |
|---|---|---|---|
| Local mail server or PHP mail() | 25 | Yes | Also the route DigitalOcean advises against |
| Provider SMTP with STARTTLS | 587 | Yes | The usual default in SMTP plugins, so it fails out of the box |
| Provider SMTP with implicit TLS | 465 | Yes | Mailgun and SendGrid list 465 for TLS or SSL |
| Provider SMTP on the alternate port | 2525 | Not named in the block | Postmark, Mailgun and SendGrid all list 2525; STARTTLS available |
| Provider HTTPS API | 443 | No | WP Mail SMTP says its API mailers work even if a host blocks SMTP ports |
Option 1: send through an API with WP Mail SMTP
WP Mail SMTP 4.10.3 (modified 20 October 2026, WordPress 5.5+, PHP 7.4+, 4+ million installs) lists free integrations for SendLayer, SMTP.com, Brevo, Gmail, Elastic Email, Mailgun, Mailjet, MailerSend, Mandrill, Postmark, Resend, SendGrid, SMTP2GO and SparkPost; Amazon SES, Microsoft 365 and Zoho are Pro-only. The listing says the built-in integrations send through the provider's API, and its FAQ names SendLayer, SMTP.com, Brevo, Mailgun, SendGrid, Postmark, SparkPost and SMTP2GO as using official provider APIs. Confirm on the plugin settings screen which method your chosen mailer uses.
API sending travels over HTTPS on port 443, which a Droplet already uses for updates, so it is the least fragile route and does not depend on a port that could be added to the block later.
Option 2: SMTP on port 2525
If your provider has no API mailer in your plugin, use its SMTP server on 2525. Postmark lists smtp.postmarkapp.com on 25, 2525 or 587 and recommends using TLS, and a separate smtp-broadcasts.postmarkapp.com host for broadcast mail, which keeps newsletters apart from receipts. Mailgun lists smtp.mailgun.org on 25, 465, 587 and 2525, with 2525 accepting STARTTLS. SendGrid lists smtp.sendgrid.net on 25, 2525 or 587 for TLS and 465 for SSL, with the literal username apikey and an API key as the password.
In the WordPress SMTP settings, choose TLS (STARTTLS), set the port to 2525, and enter the provider credentials. WP Mail SMTP's FAQ says its Other SMTP mailer can read the password from wp-config.php, so it is not stored in the database or shown in settings.
Test from the Droplet before you launch
- Confirm the block: nc -vz smtp.postmarkapp.com 587 should time out; nc -vz smtp.postmarkapp.com 2525 should connect.
- If you restricted outbound traffic with a Cloud Firewall, add an outbound rule for TCP 443 (API) or TCP 2525 (SMTP); DigitalOcean says no outbound traffic is permitted if no outbound rules exist.
- Send a test from the plugin's test screen, then trigger a real password reset and a test enrollment.
- Complete the provider's domain verification before sending to learners.
- Separate transactional mail (receipts, resets) from marketing; Postmark uses separate streams and hostnames for this.
- Watch the provider's activity log on launch day; a WordPress success message only means the hand-off worked.
Questions before you decide
Which SMTP ports does DigitalOcean block?
Ports 25, 465 and 587, on all Droplets by default and including traffic through a Reserved IP, according to its support article last verified 13 July 2026.
Can I ask DigitalOcean to unblock port 587?
Its SMTP article does not describe any way to lift the block. It recommends using a third-party email service provider instead.
Does port 2525 work from a Droplet?
DigitalOcean names only 25, 465 and 587 in its block, and Postmark, Mailgun and SendGrid all accept SMTP on 2525. Test with nc before relying on it.
What is the most reliable way to send WordPress mail from a Droplet?
A provider's HTTPS API through a plugin such as WP Mail SMTP, which says its API mailers work even when a host blocks SMTP ports.
Sources & verification
Product details and prices can change. Check the linked provider before buying.
- DigitalOcean Docs: Why is SMTP blocked? Accessed 30 Oct 2026
- Postmark: Send email with SMTP Accessed 30 Oct 2026
- Mailgun: Send via SMTP Accessed 30 Oct 2026
- Twilio SendGrid: Integrating with the SMTP API Accessed 30 Oct 2026
- WordPress.org: WP Mail SMTP plugin listing Accessed 30 Oct 2026
- DigitalOcean Docs: Configure firewall rules Accessed 30 Oct 2026
Sources link directly to providers. Product buttons may use separately labeled affiliate links. Read our disclosure.