SMTP (Simple Mail Transfer Protocol) is the internet standard for sending email. It is used to transfer messages from your email client to your mail server (submission), and between mail servers during delivery. SMTP was defined in 1982 and remains the universal standard for email transmission today.

How Email Delivery Works (SMTP Flow)

  1. You click Send. Your email client connects to your provider's SMTP server on port 587 (submission).
  2. Your client authenticates with your username and password.
  3. The SMTP server accepts the message and queues it for delivery.
  4. The server performs a DNS MX record lookup to find the recipient's mail server.
  5. Your server connects to the recipient's server on port 25 and delivers the message.
  6. The recipient's server stores the message for retrieval by their email client via IMAP or POP3.

SMTP Ports

PortUseEncryption
25Server-to-server relay (MTA to MTA)Optional STARTTLS
465Legacy SMTP over TLS (SMTPS)Always encrypted (deprecated but still used)
587Client submission (your app to your mail server)STARTTLS required

SMTP Authentication and Security

The original SMTP specification had no authentication. Today:

  • SMTP AUTH — Requires username/password before accepting mail for sending
  • STARTTLS — Upgrades the connection to TLS encryption after initial connection
  • SPF, DKIM, DMARC — Sender authentication standards layered on top of SMTP to prevent spoofing

SMTP vs IMAP vs POP3

  • SMTP — For sending email outbound
  • IMAP — For receiving and syncing email across multiple devices (messages stay on server)
  • POP3 — For downloading email to one device (messages typically removed from server)

People Also Ask

Why is my email not sending? SMTP error?
Common SMTP errors: 421 (server unavailable — retry later), 450/550 (recipient address rejected — check the address), 535 (authentication failed — check username/password), 550 5.7.1 (your IP is blacklisted — check our Blacklist Check). Port 587 with STARTTLS and correct credentials resolves most client-side sending issues.
What is an SMTP relay?
An SMTP relay is a service that accepts your outgoing email and delivers it on your behalf. Transactional email services (SendGrid, Mailgun, Amazon SES) act as SMTP relays — your application sends to their servers using SMTP, and they handle delivery, reputation management, and bounce handling.

Related: Email spoofing | SPF records | DKIM | Blacklist Check