---
title: Is SMTP TCP or UDP? Technical Protocol Analysis | SendHQ
description: Technical explanation of why SMTP uses TCP instead of UDP for email transmission, including port assignments and reliability requirements.
canonical: https://sendhq.cc/terms/is-smtp-tcp-or-udp
last-updated: 2026-08-26
---
# Is SMTP TCP or UDP? Technical Protocol Analysis

SMTP is a TCP protocol. It relies on the Transmission Control Protocol to ensure that email messages are delivered reliably, in the correct order, and without data loss, which is critical for communication protocols where every byte of the message must arrive intact.

## Why SMTP Requires TCP

SMTP requires a connection oriented protocol because email delivery cannot tolerate packet loss. TCP provides a three way handshake to establish a session, sequence numbers to order packets, and acknowledgments to confirm receipt. If a packet is lost during transmission, TCP automatically requests a retransmission. UDP is connectionless and does not guarantee delivery, making it unsuitable for the structured command response nature of SMTP sessions.

## The SMTP Handshake Process

The TCP connection allows SMTP to perform a conversational exchange. After the TCP socket is open, the server sends a 220 greeting. The client then sends EHLO or HELO to initiate the session. This stateful interaction continues through MAIL FROM and RCPT TO commands. Without the reliable stream provided by TCP, the server and client could not synchronize these state transitions or handle error codes effectively.

## Standard SMTP TCP Ports

SMTP operates on several registered TCP ports depending on the use case. Port 25 is used for server to server relay. Port 587 is the standard for client submission using STARTTLS. Port 465 is used for implicit TLS. All these assignments are managed by IANA and specifically utilize the TCP transport layer to maintain session integrity during the transmission of message headers and bodies.

## Security and Transport Layer

Modern SMTP implementations wrap the TCP stream in TLS to provide encryption. This is achieved either via the STARTTLS command on port 587 or via implicit TLS on port 465. Because TLS itself requires a reliable transport layer to perform its own handshake and key exchange, the underlying TCP connection is mandatory. Developers can use SendHQ free tools to verify their DNS settings for these secure connections.

## Comparison with UDP Protocols

While SMTP uses TCP, other email related services like DNS use UDP for fast, low overhead queries. However, once the DNS query resolves the mail server IP via UDP, the actual mail transfer switches to TCP. This hybrid approach allows for fast lookup and reliable delivery. UDP is used for speed and efficiency, while TCP is used for accuracy and session management.

## Questions teams ask

**Can SMTP ever run over UDP?**

No, the SMTP specification requires a reliable, ordered stream of data, which is only provided by TCP. UDP does not support the necessary session management.

**Which TCP port is best for sending email?**

Port 587 is the recommended port for email submission as it supports STARTTLS for secure transmission.

**Does TLS change the transport protocol?**

No, TLS is a cryptographic layer that sits on top of TCP. It encrypts the data but still relies on TCP for the actual transport of packets.

**Why does DNS use UDP if SMTP uses TCP?**

DNS uses UDP for small, fast queries to reduce latency. SMTP uses TCP because the loss of a single packet could corrupt an entire email message.

## 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 3207: SMTP Service Extension for Secure SMTP over Transport Layer Security](https://www.rfc-editor.org/rfc/rfc3207) — RFC Editor

## Continue learning

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