What Is SMTP and How It Works

SMTP is the protocol that email servers use to send, relay, and deliver messages across the internet. Every email travels through SMTP, and the decisions that happen during SMTP transactions directly determine whether your messages reach the inbox or get rejected.

What Is SMTP and How It Works
Do not index

Introduction

SMTP, or Simple Mail Transfer Protocol, is the standard protocol that email servers use to send, relay, and deliver email messages across the internet. Every email you've ever sent, whether from Gmail, Outlook, a CRM, a marketing platform, or a custom application, traveled from sender to recipient using SMTP. Without it, email as a communication system doesn't function.
Most people who send email at scale have never thought about SMTP because it runs beneath every email tool they use. But understanding how it works matters for anyone who depends on email for business. SMTP is the layer where deliverability problems originate, where authentication gets verified, where connections get refused, and where the difference between inbox and spam often gets decided. When something breaks in your email infrastructure, SMTP is almost always where the breakdown occurs.
This isn't a protocol you configure every day. But when your emails start bouncing, your platform throws connection errors, or your deliverability drops for no obvious reason, knowing what SMTP does and how it behaves is the difference between diagnosing the problem in minutes and spending weeks guessing.

How SMTP Works: The Sending Process

When you hit send on an email, the message doesn't fly directly from your computer to the recipient's inbox. It passes through a series of servers, and SMTP governs every handshake along the way.
The process starts with your email client or sending platform connecting to an SMTP server. This is your outbound mail server, the one responsible for accepting your message and routing it toward its destination. If you use Gmail, Google's SMTP servers handle this. If you send through SendGrid or Mailgun, their SMTP infrastructure takes over. If you run your own mail server, your SMTP daemon does the work.
Once the SMTP server accepts the message, it looks at the recipient's email address and queries DNS to find the MX (Mail Exchange) records for the recipient's domain. MX records tell the sending server which mail servers are authorized to receive email for that domain. If you're sending to someone@company.com, the SMTP server asks DNS: "which servers handle mail for company.com?" DNS returns the MX records, and the sending server connects to the highest priority one.
The sending server then opens a connection to the recipient's mail server using SMTP and begins a conversation. This conversation follows a specific sequence: the sending server identifies itself (HELO or EHLO command), specifies the sender address (MAIL FROM), specifies the recipient address (RCPT TO), and then transmits the email content (DATA). The receiving server responds at each step with status codes indicating whether the operation succeeded or failed.
If everything checks out, the receiving server accepts the message and delivers it to the recipient's mailbox. If something fails at any point, the receiving server responds with an error code, and the sending server either retries later or bounces the message back to the sender depending on whether the error is temporary or permanent.

SMTP Ports and Why They Matter

notion image
SMTP operates on specific network ports, and using the wrong one is a surprisingly common cause of connection failures that teams spend hours debugging.
Port 25 is the original SMTP port. It's used for server-to-server communication, meaning it's how mail servers relay messages to each other. Most residential ISPs block port 25 outbound to prevent spam, so you can't typically use it from a home or office network to send email directly.
Port 587 is the standard port for email submission. This is what your email client or application should use when sending outgoing mail through an SMTP server. It requires authentication (you need to log in with credentials) and supports STARTTLS encryption, which upgrades the connection to TLS after the initial handshake.
Port 465 was originally assigned for SMTPS (SMTP over implicit SSL/TLS). It fell out of official use for years but was reassigned in 2018 for message submission over TLS. Some providers support it; others don't. If port 587 works for your setup, there's rarely a reason to use 465 instead.
Port 2525 is an unofficial alternative that some email services offer as a fallback when ISPs or firewalls block the standard ports. It's not an official IANA standard, but platforms like SendGrid and Mailgun support it.
If your emails aren't sending and your platform shows connection timeout errors, the port configuration is one of the first things to check. A server configured to connect on port 25 when it should be using 587 will fail silently in many environments.

SMTP Authentication: Why It Matters for Deliverability

SMTP by itself doesn't verify identity. The original protocol was built in 1982, when the internet was a small trusted network of academic and military institutions. Authentication wasn't part of the design because everyone on the network was assumed to be legitimate.
That assumption hasn't held up. Modern SMTP relies on several layers of authentication that were added over the decades to address the original protocol's lack of identity verification.
SMTP AUTH is the mechanism that requires a username and password (or OAuth token) before the server will accept a message for sending. This prevents unauthorized users from relaying email through your server. Without SMTP AUTH, an open relay would allow anyone on the internet to send email through your infrastructure, which is exactly what spammers exploited throughout the 1990s and early 2000s.
SPF, DKIM, and DMARC operate at a different layer but interact directly with SMTP. When the receiving server accepts an SMTP connection, it checks these authentication protocols to verify that the sending server is authorized to send on behalf of the claimed domain (SPF), that the message hasn't been altered in transit (DKIM), and that the domain owner has published a policy for handling authentication failures (DMARC).
In 2026, Microsoft completed its phase out of Basic Authentication for SMTP AUTH, requiring all connections to use OAuth 2.0. Google completed the same transition in 2025. If your email platform or application still uses username/password authentication to connect to Gmail or Outlook SMTP servers, those connections no longer work. They fail silently, and many teams don't realize the cause until they check the SMTP logs.

SMTP vs IMAP vs POP3: What Each Protocol Does

SMTP gets confused with IMAP and POP3 because all three are email protocols, but they serve completely different functions.
SMTP handles sending. It's the protocol that moves email from the sender's server to the recipient's server. Once the email arrives at the recipient's mail server, SMTP's job is done.
IMAP (Internet Message Access Protocol) handles receiving and managing email. When you open Gmail or Outlook and see your inbox, your email client is using IMAP to connect to the mail server and display your messages. IMAP keeps emails on the server and syncs them across all your devices, so you see the same inbox on your phone, laptop, and tablet.
POP3 (Post Office Protocol version 3) also handles receiving, but differently. POP3 downloads emails from the server to your local device and typically deletes them from the server afterward. It doesn't sync across devices. If you download an email on your laptop using POP3, it won't appear on your phone.
The practical distinction: SMTP is for sending. IMAP and POP3 are for reading. Every email system uses SMTP to send messages, then either IMAP or POP3 (or a proprietary protocol like Exchange ActiveSync) to let recipients access them.

Common SMTP Errors and What They Mean

notion image
SMTP communicates through numerical status codes. When something goes wrong, the error code tells you exactly what failed, if you know how to read it.
421 errors are temporary failures. The receiving server is telling your server to try again later. This usually means the server is overloaded, you're being rate limited, or there's a temporary configuration issue. Most sending platforms retry automatically after a 421, and the message eventually gets through.
450 errors mean the mailbox is temporarily unavailable. The recipient exists but can't receive mail right now, often because their mailbox is full or the account is suspended.
550 errors are permanent failures. The recipient doesn't exist, the domain doesn't accept mail, or the server has permanently rejected your message. A 550 bounce means you should remove that address from your list immediately; continuing to send to it damages your sender reputation.
553 errors typically mean the sending address is malformed or not authorized. This often indicates an authentication problem on your end.
554 errors mean the receiving server rejected the message, usually because of a spam filter, policy violation, or blacklist. If you're seeing 554 responses from Gmail or Outlook, it's likely a reputation or authentication issue.
Understanding these codes saves time. Instead of guessing why a campaign underperformed, checking the SMTP response codes tells you whether the problem is on your end (authentication, reputation, configuration) or the recipient's end (full mailbox, invalid address, server down).

SMTP Relay and Why It Matters for Sending at Scale

When businesses send email through platforms like SendGrid, Mailgun, Amazon SES, or Mailwarm's SMTP warmup, they're using what's called an SMTP relay. Instead of sending email directly from their own server, they route it through a third party SMTP server that handles delivery on their behalf.
Relay services exist because sending email at scale from your own server is technically demanding and carries significant risk. You need to manage IP reputation, handle bounce processing, maintain proper DNS records, comply with rate limits across dozens of providers, and monitor deliverability in real time. SMTP relay services handle all of this infrastructure, allowing you to focus on the content and strategy of your email program.
Mailwarm supports SMTP warmup for any relay service. If you send through a custom SMTP server rather than a standard email provider like Gmail or Outlook, Mailwarm connects to it and runs warmup through the same infrastructure your campaigns use. This builds reputation on the exact server, IP, and domain combination that your real emails will come from.

How SMTP Affects Your Email Deliverability

SMTP is the transport layer, but the decisions that happen during SMTP transactions directly affect whether your emails reach the inbox.
When your sending server connects to Gmail's receiving server, the SMTP conversation is where Gmail checks your IP reputation, verifies your SPF record, validates your DKIM signature, evaluates your DMARC policy, and decides whether to accept, defer, or reject the message. All of this happens within the SMTP handshake before the email is even processed for content filtering.
A domain with a strong reputation, clean authentication, and a history of positive engagement will see its SMTP connections accepted consistently. A domain with high bounce rates, poor authentication, or blacklist entries will see increasing numbers of 421 deferrals and 550 rejections at the SMTP level. These rejections happen before the email reaches any inbox or spam folder. They're the harshest form of filtering because the email never arrives in any form.
This is why warmup matters at the SMTP level. Mailwarm's SMTP warmup sends emails through your actual SMTP infrastructure and generates positive engagement on the receiving end, building the reputation signals that receiving servers evaluate during every SMTP transaction your domain initiates.

Conclusion

SMTP is the invisible foundation beneath every email you send. It's been running since 1982, and despite its age, every modern email system still depends on it. Understanding how it works gives you the ability to diagnose deliverability problems at their source, interpret error codes that your email platform surfaces, and make informed decisions about your sending infrastructure.
For anyone sending at scale, the SMTP layer is where reputation gets built or destroyed, where authentication passes or fails, and where receiving servers decide whether your email deserves to reach a human being. Keeping that layer healthy through proper configuration, consistent warmup, and ongoing monitoring is the foundation that everything else in your email program sits on.
Mailwarm supports warmup across Gmail, Outlook, Yahoo, Microsoft 365, and custom SMTP servers. You can explore the full feature set at mailwarm.com/features.

Other Questions People Ask About SMTP

Is SMTP used for receiving emails too?
SMTP handles the transport of email from sender to recipient server. It's involved in both sending and receiving in the sense that the receiving server uses SMTP to accept inbound messages. But when you read your email in a client like Gmail or Outlook, you're using IMAP or POP3, not SMTP. SMTP gets the email to the server; IMAP or POP3 gets it to your screen.
What happens when an SMTP connection times out?
A timeout means the sending server couldn't establish or maintain a connection to the receiving server within the allotted time. Common causes include incorrect port configuration, firewall rules blocking the connection, the receiving server being down or overloaded, or DNS resolution failures on the MX records. Most sending platforms retry automatically after a timeout.
Do I need my own SMTP server to send email?
No. Most businesses use an email service provider that manages SMTP infrastructure on their behalf. Gmail, Outlook, SendGrid, Mailgun, and Amazon SES all provide SMTP access as part of their service. Running your own SMTP server gives you full control but requires significant technical expertise to manage reputation, authentication, and compliance.
What's the difference between SMTP and an API for sending email?
SMTP is a protocol that any email client or server can use to send messages. An API (like SendGrid's Web API or Mailgun's REST API) is a proprietary interface that sends email through HTTP requests rather than SMTP connections. APIs are often faster and easier to integrate into applications, but the emails they send still travel over SMTP between servers. The API is just a different way to hand the message to the sending infrastructure.
Can SMTP be encrypted?
Yes. STARTTLS upgrades an SMTP connection to TLS encryption after the initial handshake. Port 465 uses implicit TLS, where the connection is encrypted from the start. In 2026, most major providers require TLS encryption for SMTP connections; unencrypted connections are increasingly rejected.
Why does my email platform show "delivered" but the recipient didn't get the email?
"Delivered" in most email platforms means the receiving server returned a 250 OK response during the SMTP transaction, indicating it accepted the message. It doesn't mean the email reached the inbox. After accepting the message, the receiving server runs additional filtering (content analysis, reputation scoring, engagement evaluation) that can route the email to spam, promotions, or a quarantine folder. Your platform has no visibility into these post-acceptance decisions.

Most senders lose 30–70% of their emails to spam without knowing it.

Get a free expert audit of your domain, email authentication, and infrastructure. Identify hidden issues and fix them fast.

Book Your Free Deliverability Audit

Written by

Daniel Nwankwo

Community and Content manager