SMTP Protocol: Mail Transfer and Delivery
Simple Mail Transfer Protocol moves mail between clients and mail servers or between mail transfer agents. Its reply codes describe progress at one hop, not the entire delivery chain.
Updated · Editorial approach and simulation limits
A mail transaction starts with a dialogue
A server greets the connecting client, which can send EHLO to discover extensions. A mail transaction then identifies an envelope sender with MAIL FROM, one or more recipients with RCPT TO, and message content after DATA. The envelope controls routing; message headers are a separate part of the submitted content.
SMTP is a command-and-response protocol. Read the reply after each command and correlate the final response after the message body. A server can accept responsibility for a message without the recipient reading it or even receiving it immediately.
Accepted by one server does not mean delivered end to end
SMTP relays mail hop by hop. A successful final reply means the receiving server accepted the message for further processing at that hop. Delivery can later be delayed, rejected by a downstream system or routed to a different mailbox according to policy.
When diagnosing bounces, separate the client submission result from later transfer status and delivery notifications. SPF, DKIM and DMARC influence mail authentication policy but are not SMTP commands that replace the message transfer dialogue.
TLS and authentication are negotiated separately
SMTP deployments can use TLS from connection start or upgrade with STARTTLS, and can use an authentication extension for client submission. The existence of SMTP does not imply encryption or login; inspect the capability advertisement and the actual negotiation.
A capture without TLS keys cannot show protected message content. Use sanitized test mail, preserve reply codes and timestamps, and do not post live recipient addresses or message bodies in a public trace.
Explore SMTP interactively
Follow the matching exchange packet by packet. The animation is a scripted teaching model with illustrative timing, not a capture of your network.
Specification and source
For exact protocol requirements, consult the primary document: RFC 5321: Simple Mail Transfer Protocol. This page summarizes selected behavior and is not a substitute for the specification.
Related protocol lessons
Browse all application protocols · Read a request-response protocol exchange