What is an SMTP server and how does it work?

Still have a question, spotted an error, or have a better explanation or a source we should cite?

SMTP stands for Simple Mail Transfer Protocol. It's the standard protocol used to send and route email between servers. Every time you hit send, SMTP is the engine that moves your message from point A to point B.

Here's what actually happens when you send an email. Your email client or ESP connects to an SMTP server (usually on port 587 for submission, or port 25 for server-to-server transfer). Your server then looks up the recipient domain's MX records in DNS to find where that domain receives mail. Once it has the address, it initiates a connection to the receiving server and they go through a handshake sequence.

That handshake looks something like this:

  • Your server says hello (EHLO command) and identifies itself
  • Both servers negotiate capabilities (like whether to use encryption)
  • Your server hands over the envelope data: who it's from, who it's going to
  • Your server transfers the message body
  • The receiving server confirms it accepted the message
  • Connection closes

That whole exchange typically takes less than a second. If the receiving server is temporarily unavailable, your SMTP server queues the message and retries at intervals (usually for up to 72 hours before bouncing it back to you).

SMTP is specifically an outgoing protocol. It pushes email out. It doesn't handle reading or retrieving mail. That's what IMAP and POP3 are for. Think of SMTP as the postal worker who delivers the letter. IMAP and POP3 are how you open your mailbox and read what arrived.

When you send through an ESP like Postmark or Twilio SendGrid, you're still using SMTP under the hood. The ESP just manages the server infrastructure, IP reputation, and delivery logistics so you don't have to. Some platforms also offer HTTP APIs as an alternative to raw SMTP, but the final hop to the recipient's mailbox always runs over SMTP.

One thing worth knowing: the SMTP server your ESP uses has its own reputation with inbox providers like Gmail and Outlook. That reputation is tied to authentication (SPF, DKIM, DMARC), sending behavior, and complaint rates. So even though SMTP is just a protocol, how you send matters as much as the mechanics of the send itself.

Contributors

Who worked on this answer

Every name links to their profile. Every company links to their site. Real people, real accountability.

Ask an AI · tailored to your setup

Paste your details above and get a plain-English breakdown of your SMTP setup.

I read this on the Email Almanac about how SMTP servers work. I'd like help understanding how this applies to my specific sending setup. Please give me: 1. A plain-language summary of what my SMTP configuration should look like 2. What to check or verify for my infrastructure 3. Common SMTP misconfigurations that hurt deliverability 4. How to confirm everything is working correctly My details (fill in what applies): - Email platform or ESP: e.g. Postmark, SendGrid, Mailchimp, custom Postfix - Sending domain(s): your domain - Sending volume: e.g. 10,000/month or 500/day - Infrastructure type: shared ESP / dedicated IP / self-hosted MTA / hybrid - Authentication configured: SPF yes/no, DKIM yes/no, DMARC policy - SMTP port in use: 25 / 465 / 587 / unsure - Current issues: bounces, timeouts, rejections, delays, auth failures

Edit the yellow boxes, then send to the AI of your choice.