SMTP Explained

A technical explanation of SMTP (Simple Mail Transfer Protocol) — how email moves between servers and the basics of email delivery.

SMTP (Simple Mail Transfer Protocol) is the foundation of email delivery. Understanding how SMTP works helps you troubleshoot delivery issues and understand the path an email takes from sender to recipient.

What is SMTP?

SMTP is the protocol used to send email between servers. When you send an email, your email client uses SMTP to transfer the message to your mail server. That server then uses SMTP to relay the message to the recipient's mail server. SMTP handles only sending; receiving is handled by other protocols (IMAP, POP).

How SMTP works

  1. Connection establishment. The sending server connects to the receiving server on port 25 (or 587 for submission, 465 for SMTPS).
  2. EHLO/HELO greeting. The sending server identifies itself with an EHLO (Extended Hello) or HELO command.
  3. MAIL FROM command. The sender specifies the return path (envelope sender).
  4. RCPT TO command. The sender specifies the recipient address. This can be repeated for multiple recipients.
  5. DATA command. The sender begins transmitting the message content (headers and body).
  6. Message transmission. The email content is transmitted, terminated by a line containing only a period.
  7. QUIT command. The connection is closed.

SMTP ports

Port 25: The standard SMTP port for server-to-server communication. Often blocked by ISPs to prevent spam.

Port 587: The standard port for message submission (client to server). Supports STARTTLS for encryption.

Port 465: Historically used for SMTPS (SMTP over SSL). Less common now but still supported by some services.

SMTP authentication

Modern SMTP servers require authentication to prevent abuse. Common authentication methods include:

PLAIN: Username and password sent in clear text (only over TLS).

LOGIN: Similar to PLAIN but with different command structure.

CRAM-MD5: Challenge-response authentication that avoids sending passwords in clear text.

OAUTHBEARER: OAuth 2.0 token-based authentication, increasingly common for modern services.

Common SMTP issues

Connection timeouts: Usually caused by network issues, firewall blocks, or overloaded receiving servers.

Authentication failures: Wrong credentials, authentication method not supported, or account issues.

Relay denied: The server refuses to relay the message to the destination, typically due to spam filtering or policy restrictions.

Rate limiting: The server limits how many messages can be sent in a time period to prevent abuse.

Temporary email and SMTP

Temporary email services receive mail via SMTP like any other mail server. The difference is in how they handle the mail after receipt — temporary services match incoming messages against active inboxes and discard messages for expired addresses. The SMTP protocol itself works identically.

Questions

Why is port 25 often blocked?
ISPs block port 25 to prevent infected computers from sending spam directly. This is why you typically use port 587 for submission to your mail provider, which then relays to port 25 for server-to-server delivery.
Does SMTP encrypt email content?
SMTP itself does not encrypt content. Encryption is provided by STARTTLS (opportunistic encryption) or SMTPS (forced encryption). Without encryption, email content is transmitted in clear text between servers.

Keep reading

Need a throwaway address right now?

Open the generator and a fresh inbox is waiting before the page finishes settling.

Generate a temporary email