Updated: 30 September 2026 · Applies to: email clients, websites and mail servers (cPanel hosting, VPS and dedicated servers)

SMTP is the protocol for sending email. It uses different ports for different jobs, and picking the wrong one is a common reason why an email app or a website can’t send mail.

Which port for what

  • 587 (submission, STARTTLS): the standard port for email apps and websites to send mail through your mail server. The connection starts in plain text and switches to encryption with STARTTLS. Requires your username and password.
  • 465 (submission over TLS): the same job, but encrypted from the first byte (implicit TLS). Current standards (RFC 8314) prefer it; both 465 and 587 are fine.
  • 25 (relay): for mail servers delivering mail to each other. Don’t use it in an email app; many home and office internet providers block it.
  • 2525: not an official port. Some email sending services offer it as an alternative when 587 is blocked.

Settings for an email app

  • Outgoing server: your mail server, for example mail.example.com.
  • Port 465 with SSL/TLS, or port 587 with STARTTLS.
  • Authentication: on, with the full email address and its password.

Incoming mail uses other ports: 993 for IMAP and 995 for POP3 (both encrypted). See HTTPS and SSL port numbers.

Test a port from a server

nc -zv smtp.example.com 587
openssl s_client -starttls smtp -connect smtp.example.com:587 -brief   # STARTTLS on 587
openssl s_client -connect smtp.example.com:465 -brief                  # TLS on 465

We tested these from a Ucartz VPS: both negotiated TLS 1.3.

On Ucartz servers

Ucartz VPS and dedicated servers don’t block outgoing port 25, so your own mail server can deliver mail directly. Set up SPF, DKIM and reverse DNS before you send; see sending email from your own dedicated server: a checklist. More about port 25: what is port 25.

Official documentation: RFC 8314: cleartext considered obsolete (ports 465 and 587).

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)