---
title: What Port Does SMTP Use? Standard SMTP Port Guide | SendHQ
description: Technical guide on SMTP ports 25, 465, and 587. Learn which port to use for mail submission, relaying, and secure TLS connections.
canonical: https://sendhq.cc/terms/what-port-does-smtp-use
last-updated: 2026-08-26
---
# What Port Does SMTP Use? Standard SMTP Port Guide

SMTP uses port 25 for server to server relay, port 587 for mail submission via STARTTLS, and port 465 for implicit TLS. The correct port depends on whether you are sending mail from a client to a server or transferring mail between two mail servers.

## Port 25 for Relay

Port 25 is the original standard for SMTP. It is primarily used for relaying messages between Mail Transfer Agents (MTAs). Most residential Internet Service Providers (ISPs) and cloud providers block outbound traffic on port 25 to prevent spam from compromised devices. Developers should avoid using port 25 for client submission and reserve it for server to server communication.

## Port 587 for Submission

Port 587 is the modern standard for email submission. It is used by mail clients to send messages to a submission server. This port typically employs STARTTLS, which begins as an unencrypted connection and upgrades to a secure TLS connection. It is the recommended port for application integration and third party SMTP services.

## Port 465 for Implicit TLS

Port 465 was originally designated for SMTPS. While it was once deprecated, it is still widely used for implicit TLS, where the connection is encrypted from the very first packet. Many legacy systems and specific providers still require port 465 for secure transmission, though port 587 is generally preferred for new implementations.

## Choosing the Right Port

To select the correct port, identify your role in the mail flow. If you are configuring a server to receive mail from other servers, use port 25. If you are writing code to send email via an API or SMTP relay, use port 587. You can use SendHQ free tools to verify your DNS and authentication settings to ensure your mail is accepted regardless of the port used.

## Troubleshooting Connection Issues

Connection timeouts on port 25 usually indicate an ISP block. If port 587 fails, verify that your client supports STARTTLS and that the firewall allows outbound traffic on that port. Always ensure that your authentication credentials are correct, as many servers will reject connections on submission ports without valid SMTP AUTH.

## Questions teams ask

**Is port 25 secure?**

Port 25 is not secure by default. While it can use STARTTLS, it is often blocked by ISPs to prevent spam and is not recommended for client submission.

**What is the difference between 465 and 587?**

Port 465 uses implicit TLS, meaning the connection is encrypted immediately. Port 587 uses explicit TLS via the STARTTLS command to upgrade a plain connection.

**Why is my SMTP connection timing out?**

Timeouts are often caused by firewall rules or ISP blocks on port 25. Switching to port 587 usually resolves these connectivity issues for developers.

## Primary sources

- [RFC 5321: Simple Mail Transfer Protocol](https://www.rfc-editor.org/rfc/rfc5321) — RFC Editor
- [Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml) — IANA
- [RFC 8314: Cleartext Considerations for Post-SMTP Email Protocols](https://www.rfc-editor.org/rfc/rfc8314) — RFC Editor

## Continue learning

[smtp port](https://sendhq.cc/guides/smtp-port.md) [mail protocol smtp](https://sendhq.cc/guides/mail-protocol-smtp.md) [free smtp service](https://sendhq.cc/guides/free-smtp-service.md) [smtp relay service](https://sendhq.cc/guides/smtp-relay-service.md) [email deliverability](https://sendhq.cc/guides/email-deliverability.md)
