Back to Glossary
Email Protocols

SMTP(Simple Mail Transfer Protocol)

The standard protocol used to send emails across the internet from one server to another.

Definition

SMTP (Simple Mail Transfer Protocol) is the fundamental protocol that enables email transmission across the internet. When you click send on an email, SMTP handles the delivery from your email client to your mail server, and then routes it to the recipient's mail server. It operates on port 25, 587, or 465 and uses a series of commands to establish connections, authenticate senders, and transfer message data. SMTP has been the backbone of email since 1982 and remains essential for all email communication today.

Why It Matters

Understanding SMTP is essential for email marketers because it directly affects deliverability. Your email service provider uses SMTP to send your campaigns. Issues with SMTP configuration can cause emails to be rejected or marked as spam. When setting up custom sending domains or troubleshooting delivery problems, SMTP knowledge helps you communicate with technical teams and diagnose issues. A misconfigured SMTP setup can result in all your emails bouncing or landing in spam folders.

How It Works

SMTP works through a client-server model. When you send an email, your mail client connects to an SMTP server and issues commands like HELO (greeting), MAIL FROM (sender), RCPT TO (recipient), and DATA (message content). The SMTP server then looks up the recipient's mail server using DNS MX records and forwards the message. Modern SMTP servers require authentication (SMTP AUTH) and encryption (TLS) for security. The protocol uses a series of numeric response codes (like 250 for success, 550 for rejection) to communicate status.

Example

Here is what happens when you send an email via SMTP:

  1. 1Your email client connects to smtp.yourcompany.com on port 587
  2. 2The server responds with a greeting message
  3. 3Your client authenticates with username and password
  4. 4You send the sender address (MAIL FROM)
  5. 5You send the recipient address (RCPT TO)
  6. 6You send the email content (DATA command)
  7. 7The server responds with 250 OK and queues the message

Here is what the actual SMTP conversation looks like:

C: EHLO client.example.com
S: 250-smtp.example.com Hello
C: AUTH LOGIN
S: 334 VXNlcm5hbWU6
C: [base64 username]
S: 235 Authentication successful
C: MAIL FROM:<[email protected]>
S: 250 OK
C: RCPT TO:<[email protected]>
S: 250 OK
C: DATA
S: 354 Start mail input
C: Subject: Hello!
C:
C: Your message here.
C: .
S: 250 OK: queued

Best Practices

  • 1Always use authenticated SMTP with TLS encryption for sending
  • 2Configure proper SPF, DKIM, and DMARC records for your sending domain
  • 3Monitor your SMTP logs for delivery failures and bounce patterns
  • 4Use port 587 with STARTTLS for most email sending scenarios
  • 5Implement proper error handling for SMTP response codes in your applications

Reliable Email Delivery

Sequenzy handles all SMTP complexity for you with optimized delivery infrastructure and automatic retry logic.

Learn More

Frequently Asked Questions

SMTP is used for sending emails from your client to a server and between servers. IMAP is used for retrieving and managing emails from a server. Think of SMTP as the outgoing mail service and IMAP as the incoming mail service. You need both protocols for complete email functionality.

SMTP uses port 25 for server-to-server communication (often blocked by ISPs), port 587 for client submission with STARTTLS encryption (recommended), and port 465 for implicit TLS. Most email clients and marketing platforms use port 587.

Common SMTP errors include: 421 (server too busy, try later), 450 (mailbox unavailable temporarily), 550 (mailbox not found or rejected), 553 (invalid address format), and 554 (transaction failed). Check your credentials, ensure your IP is not blocklisted, and verify your authentication records.