If your question is what SMTP port should I use, the short answer is:
- use
587with STARTTLS for most application senders - use
465only if provider requires implicit TLS - use
2525as alternate submission port when supported - avoid
25for app submission in most cloud setups
Fast decision table
| Situation | Recommended port |
|---|---|
| Standard authenticated app sending | 587 |
| Provider explicitly requires SMTPS | 465 |
587 blocked by network/provider | 2525 |
| Server-to-server relay use case | 25 |
Why 587 is usually the default
Port 587 is designed for authenticated message submission and supports STARTTLS upgrade.
This usually provides better compatibility for app senders than relying on port 25.
TLS pairing rules to avoid mistakes
587-> STARTTLS465-> implicit TLS25-> relay scenarios, often restricted for application egress
Related references:
Validate before production rollout
Use this sequence:
- Validate connection and TLS negotiation.
- Validate SMTP auth and sender policy posture.
- Validate inbox outcomes with real receive-side assertions.
Recommended workflow pages:
FAQ
Can I always use port 25?
Usually no for app-level submission. Many providers and networks restrict it.
Is 2525 an official standard port?
It is commonly supported as an alternate submission port, but support depends on provider.
Why does sending fail only in production?
Production environments often enforce stricter egress, TLS, and auth requirements than local setups.