How does SMTP operate when sending an email?
The client's SMTP process connects to the server on TCP port 25 and pushes the message; the server either drops it in a local mailbox or relays it onward, spooling it for later if the destination server is unavailable.
SMTP (Simple Mail Transfer Protocol) is the workhorse that moves mail forward across the internet, hop by hop. It is a push protocol: the sender always initiates and hands the message over, never the other way around. Each server inspects the recipient address and decides whether the mailbox lives locally or must be relayed to the next server closer to the destination. Because a target server can be down or busy, SMTP is designed to be resilient — it queues (spools) the message and retries on a schedule rather than failing outright, which is why a held-up email can still arrive minutes or hours later.
* SMTP is a push protocol on TCP 25: the client hands the message to server A, which relays it server-to-server until it reaches the recipient's mailbox, spooling and retrying if a hop is offline. *
SMTP (Simple Mail Transfer Protocol) operation:
- When a client sends email, its SMTP process connects to a server's SMTP process on well-known TCP port 25.
- After the connection is made, the client transfers the email to the server.
- When the server receives the message, it either:
- places it in a local account if the recipient is local, or
- forwards (relays) it to another mail server for delivery.
- If the destination mail server is offline or busy, SMTP spools the message and retries delivery later.
Message format: An SMTP message requires a header (recipient and sender email addresses) and a body.
Why it matters: SMTP is a push protocol used both to send mail from a client and to relay it server-to-server — it never retrieves mail; that is the job of POP3 or IMAP.
Go deeper:
-
RFC 5321 — Simple Mail Transfer Protocol — the authoritative spec for the MAIL/RCPT/DATA transaction and SMTP relaying across networks.
-
Simple Mail Transfer Protocol (Wikipedia) — SMTP as a push/delivery protocol on TCP 25, relaying server-to-server and queuing on transient failures.