SMTP (Simple Mail Transfer Protocol)
The text-based protocol used to transfer email between mail servers and from clients to servers, defined by RFC 5321.
What is SMTP?
SMTP, or Simple Mail Transfer Protocol, is the standard protocol used to relay email between mail servers and from clients to servers. It is text-based, stateful, and defined by RFC 5321. Despite being nearly 40 years old, it remains the backbone of all email transmission on the internet.
Why it matters
Every email you send, whether through an API, a webmail client, or a server daemon, eventually becomes an SMTP conversation between two machines. Understanding SMTP helps developers debug failed sends, interpret bounce codes, and configure relay hosts correctly. Ops engineers who ignore SMTP semantics end up with mysterious delivery gaps that are actually spelled out plainly in the server response.
How it works
An SMTP session begins with a TCP connection on port 25, 465, or 587. The client sends commands, the server replies with three-digit status codes.
220 mail.example.com ESMTP ready
HELO client.acme.io
250 Hello
MAIL FROM:<[email protected]>
250 OK
RCPT TO:<[email protected]>
250 Accepted
DATA
354 Go ahead
Subject: Hello
...
.
250 Queued as ABC123
QUITModern deployments use STARTTLS or implicit TLS on port 465, and authenticate with SASL on the submission port 587.
Examples
- A Postfix server relaying outbound mail to a smart host on port 587
- A monitoring script connecting to port 25 to probe whether a mail server is reachable
- A legacy application pointed at Sendkit's SMTP endpoint because it cannot call an API
Best practices
- Use port 587 with STARTTLS for client submissions, never plain port 25
- Authenticate with a unique credential per application so you can revoke access cleanly
- Read the full response code on failure; 4xx is temporary, 5xx is permanent
- Prefer an API for high-volume transactional sending where latency matters
FAQs
What is the difference between ports 465 and 587?
Port 465 uses implicit TLS from the first byte. Port 587 starts plaintext and upgrades with STARTTLS. Both are secure when configured correctly; 587 is the IETF-preferred submission port.
Why does my email get a 550 error?
550 is a permanent rejection. The recipient server has decided it will not accept the message, usually due to an unknown user, content filtering, or sender reputation.
Is SMTP slower than an email API?
Typically yes, because each message requires a multi-step conversation over a persistent connection. APIs can batch, pipeline, and return structured errors faster.
Start sending in minutes.
3,000 emails/month on the free tier. No credit card, no commitment.
Still wondering?
See what your favorite LLM has to say about us, then make an informed decision.