PROTOCOL FIELD GUIDE
How SMTP works
Submit a message using a mail envelope and a DATA body. Distinguish SMTP delivery from the POP3 or IMAP protocols used to access a mailbox.
- Default port
- 25 relay / 587 submission
- Transport / carrier
- TCP; often TLS
- Category
- application
1. Greet the server
A server greeting starts the session. EHLO lets the client discover extensions such as STARTTLS and supported authentication mechanisms.
2. Protect the session
When STARTTLS succeeds, a TLS handshake follows and the client sends EHLO again. This lab shows the SMTP layer; real credentials should travel over protected submission.
3. Set envelope addresses
MAIL FROM sets the return path; RCPT TO specifies a recipient. These envelope addresses are distinct from visible From and To headers.
4. Transfer the message
After 354, the client sends headers and body, ending with CRLF-dot-CRLF. Lines beginning with a dot are escaped by dot-stuffing.
5. Accept responsibility
A successful 250 after DATA means the server accepted responsibility, not that a person has read the message. QUIT ends the SMTP session.
Protocol relationships
Protocols cooperate across layers. Compare the neighboring lessons to distinguish addressing, delivery, application semantics and encryption.
Standards and editorial method
Written and implemented independently by NavSprout. Lessons summarize public protocol standards using synthetic documentation addresses and fictional credentials. Consult the standards for complete wire formats and normative behavior.
RFC 5321 ↗ RFC 3207 ↗