MailSlurp logo

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 587 for authenticated submission with STARTTLS
  • use port 465 only when your provider requires implicit TLS
  • avoid using port 25 for application submission in most environments
  • use port 2525 as 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

  1. Validate protocol response and TLS negotiation.
  2. Validate auth behavior with production-like credentials.
  3. Validate inbox outcomes, not just SMTP acceptance.
  4. 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.

Next steps