blog
SMTP Port Guide: 25 vs 465 vs 587 vs 2525
Understand SMTP ports 25, 465, 587, and 2525, when to use each, and how to validate connection, auth, and delivery behavior before release.
If you searched for an SMTP port guide, this is the practical default:
- use port
587for authenticated submission with STARTTLS - use port
465only when your provider requires implicit TLS - avoid using port
25for application submission in most environments - use port
2525as fallback if provider supports it
SMTP port quick-reference table
| Port | Typical use | TLS mode | Notes |
|---|---|---|---|
25 |
Server-to-server relay | Optional/varies | Commonly blocked for app egress |
465 |
Submission | Implicit TLS | Legacy but still supported by some providers |
587 |
Submission | STARTTLS | Best default for most app senders |
2525 |
Alternate submission | STARTTLS/varies | Useful fallback when 587 is blocked |
Port-by-port guidance
Port 25
Best for relay between mail servers, not usually for app-level authenticated submission.
Port 465
Use when provider explicitly requires SMTPS (implicit TLS).
Port 587
Preferred for modern authenticated client submission with STARTTLS.
Port 2525
Fallback option in restricted networks when provider supports alternate submission.
SMTP ports and security posture
Port selection must align with:
- TLS negotiation mode
- auth mechanism and credential policy
- sender-domain alignment (SPF, DKIM, DMARC)
Related:
How to validate SMTP port configuration
- Validate protocol response and TLS negotiation.
- Validate auth behavior with production-like credentials.
- Validate inbox outcomes, not just SMTP acceptance.
- Validate template and link correctness in receive-side tests.
Use these workflows:
Common SMTP port mistakes
Using 25 for app submission in restricted cloud networks
This often fails due to provider or infrastructure egress policies.
Using 465 with STARTTLS configuration
465 expects implicit TLS, not STARTTLS upgrade behavior.
Assuming SMTP acceptance equals inbox delivery
SMTP acceptance confirms transfer, not inbox placement or user visibility.
FAQ
Which SMTP port is best for applications?
Port 587 is usually best for authenticated app submission with STARTTLS.
Is port 465 obsolete?
Not fully. It is still supported by many providers for implicit TLS submission.
When should I use 2525?
Use 2525 as a fallback when your provider supports it and 587 is blocked.