When an email fails to deliver, the receiving server returns an SMTP error code explaining why. Understanding these codes is essential for diagnosing deliverability issues and maintaining a healthy sender reputation. This guide covers every SMTP error code you're likely to encounter and provides actionable solutions for each.
Understanding SMTP Response Codes
SMTP (Simple Mail Transfer Protocol) response codes are three-digit numbers returned by mail servers during the email delivery process. Each digit has a specific meaning:
- First digit: Indicates the overall status (2=success, 4=temporary failure, 5=permanent failure)
- Second digit: Indicates the category (0=syntax, 1=information, 2=connections, 5=mail system)
- Third digit: Provides more specific information
Modern mail servers also include Enhanced Status Codes (RFC 3463) in the format X.Y.Z, providing even more detail about the error.
550 5.1.1 The email account that you tried to reach does not exist.2XX Success Codes
Codes starting with 2 indicate successful operations. These are what you want to see.
220 - Service Ready
The server is ready to accept connections. This is the greeting message you receive when first connecting to an SMTP server.
250 - Requested Action Completed
The most common success code. It means the server accepted your command (HELO, MAIL FROM, RCPT TO, etc.) and is ready for the next step.
251 - User Not Local; Will Forward
The recipient isn't on this server, but the server will forward the message. This is common with mail forwarding setups.
354 - Start Mail Input
The server is ready to receive the email content. Send your message data and end with a period on a line by itself.
4XX Temporary Failure Codes
Codes starting with 4 indicate temporary failures. The sending server should retry delivery later. Most email systems automatically retry 4XX errors for 24-72 hours before giving up.
Soft Bounces
421 - Service Not Available
The server is temporarily unavailable, often due to maintenance or high load. Your email system will automatically retry.
Solution: Wait and retry. If persistent, check if the receiving domain is experiencing issues.
450 - Mailbox Unavailable
The recipient's mailbox is temporarily unavailable. Common causes include a full mailbox or the account being temporarily disabled.
Solution: Retry later. If the error persists for days, the address may be abandoned.
451 - Local Error in Processing
The receiving server encountered an internal error. This is usually not your fault.
Solution: Retry automatically. If persistent, the receiving server may have configuration issues.
452 - Insufficient Storage
The receiving server doesn't have enough storage to accept the message. This could be a full mailbox or server-wide storage issues.
Solution: Retry later. For individual mailboxes, this often resolves when the user clears space.
Rate Limiting (421/452)
5XX Permanent Failure Codes
Codes starting with 5 indicate permanent failures. The message will not be delivered, and the sending server should not retry. These result in "hard bounces."
Hard Bounces
550 - Mailbox Not Found
The most common permanent error. The recipient email address doesn't exist on the server.
Solution: Remove the address from your list immediately. Verify email addresses at collection to prevent this.
550 5.1.1 User unknown
550 5.1.1 The email account does not exist
550 5.1.1 Recipient rejected
550 No such user
550 Invalid recipient551 - User Not Local
The recipient isn't on this server, and unlike 251, the server won't forward the message.
Solution: Verify the email address is correct. The domain may have changed mail servers.
552 - Message Size Exceeded
Your email (including attachments) exceeds the recipient server's size limit. Most servers limit messages to 10-25 MB.
Solution: Reduce attachment sizes or use file-sharing links instead of attachments.
553 - Invalid Address Format
The email address has invalid syntax or characters that the server doesn't accept.
Solution: Verify the email address format. Remove any invalid characters.
554 - Transaction Failed
A general rejection. Often used when the server blocks your email for policy reasons (spam filtering, blocklisting, etc.).
Solution: Check if your IP or domain is blocklisted. Review the full error message for specific reasons.
Most Common SMTP Errors and Solutions
550 5.7.1 - Message Rejected Due to Content
Your email was flagged as spam based on its content, links, or attachments.
Solutions:
- Review email content for spam trigger patterns
- Avoid URL shorteners and suspicious links
- Ensure proper authentication (SPF, DKIM, DMARC)
- Check if your sending domain is blocklisted
550 5.7.26 - Authentication Required
Gmail and other providers require proper authentication. Your email failed SPF, DKIM, or DMARC checks.
Solutions:
- Verify SPF record includes your sending IP/service
- Ensure DKIM is properly configured and signing
- Check DMARC alignment (SPF or DKIM must pass AND align)
dig TXT yourdomain.com | grep spf421 4.7.0 - Too Many Connections
You've exceeded the receiving server's connection limits. Common with Gmail when sending high volumes.
Solutions:
- Reduce concurrent connections to the same domain
- Implement exponential backoff on retries
- Spread sending over a longer time period
550 5.7.1 - IP Blocklisted
Your sending IP address is on a blocklist (Spamhaus, Barracuda, etc.).
Solutions:
- Check major blocklists (MXToolbox, MultiRBL)
- Request delisting from the blocklist operator
- Identify and fix the issue that caused the listing
- Consider using a reputable email service provider
Troubleshooting Guide
When you encounter SMTP errors, follow this systematic troubleshooting process:
Step 1: Identify the Error Type
Is it a 4XX (temporary) or 5XX (permanent) error? This determines your immediate action.
Step 2: Read the Full Error Message
The text after the code often contains specific information about why the email was rejected.
Step 3: Check Authentication
Use tools like MXToolbox or mail-tester.com to verify your SPF, DKIM, and DMARC are correctly configured.
Step 4: Check Blocklists
Search your sending IP and domain on major blocklist aggregators.
Step 5: Review Sending Patterns
Sudden volume spikes or unusual sending patterns can trigger temporary blocks.
Prevention Strategies
The best way to handle SMTP errors is to prevent them in the first place:
- Verify emails at collection: Use real-time email verification to catch invalid addresses before they enter your list.
- Maintain list hygiene: Regularly clean your list to remove inactive and bounced addresses.
- Authenticate properly: Implement SPF, DKIM, and DMARC on all sending domains.
- Monitor reputation: Use Google Postmaster Tools and similar services to track your sender reputation.
- Warm up new IPs: Gradually increase sending volume on new IP addresses.
- Handle bounces promptly: Remove hard bounces immediately and track soft bounces.