If you searched for SMTP commands and responses, use this page as your production debugging reference.
Quick answer
SMTP is a command/response protocol:
- client sends commands (
,,,) - server replies with numeric codes (
,,,) - response classes show whether to continue, retry, or fix configuration
Minimal SMTP session example
Core SMTP commands
| Command | What it does | Typical use |
|---|---|---|
| Announces client and requests capabilities | Start modern SMTP session |
| Legacy greeting | Fallback where ESMTP unsupported |
| Upgrades connection to TLS | Secure transport before auth |
| Authenticates client identity | Submission through provider |
| Sets envelope sender | Start transaction |
| Adds recipient | One call per recipient |
| Sends message headers/body | Transfer message content |
| Clears current transaction state | Recover from input mistakes |
| Health/keepalive command | Connection checks |
| Ends session | Clean disconnect |
Legacy or restricted commands (, ) are commonly disabled for security reasons.
SMTP response code reference
Success ()
: service ready: authentication successful: requested action completed: session closing
Intermediate ()
: auth challenge: start message input
Temporary failures ()
: service unavailable / connection closing: mailbox unavailable (temporary): local processing error: insufficient system storage
Temporary failures usually require retry with backoff.
Permanent failures ()
: syntax error, command unrecognized: syntax error in parameters: bad sequence of commands: authentication required: auth credentials rejected: mailbox unavailable / policy rejection / relay denied: user not local: mailbox exceeded storage allocation: invalid mailbox syntax: transaction rejected
Permanent failures usually require config/policy/address fixes before retry.
SMTP command-level troubleshooting workflow
- Confirm port and TLS mode pairing (
+ STARTTLS,implicit TLS). - Validate capability advertisement after
. - Validate auth mechanism offered by server (
variants). - Validate envelope sender/recipient syntax.
- Inspect response class and exact code to choose retry vs fix.
- Validate inbox outcomes with receive-side tests.
Useful follow-on guides:
Testing checklist before release
- Run command-level checks in Email Sandbox.
- Add delivery assertions in Email integration testing.
- Observe failure events via Email Webhooks.
- Run Email deliverability tests before campaign launches.
FAQ
What is the most important SMTP command?
is critical because it starts capability negotiation for TLS and auth.
Does always mean delivery success?
No. It means SMTP acceptance at that hop, not guaranteed inbox placement.
Should I retry responses?
Usually no until root cause is fixed. Retry logic is mainly for temporary failures.

