SMTP Error Codes: What Do These Server Responses Mean?
Time to read:
SMTP Error Codes: What Do These Server Responses Mean?
SMTP error codes are three-digit responses that mail servers send to indicate whether your email was successfully delivered, temporarily delayed, or permanently rejected. These codes help diagnose delivery problems and determine whether you should retry sending or fix the recipient address.
SMTP codes fall into four categories:
- 2xx (success)
- 3xx (redirection)
- 4xx (temporary failure)
- 5xx (permanent failure).
Understanding these codes helps you troubleshoot email delivery issues faster and maintain better sender reputation.
Below, we'll break down every major SMTP error code, what triggers it, and how to resolve it.
Quick reference: SMTP error codes
| Code | Type | Meaning | Action Needed |
|---|---|---|---|
| 211 | Info | System status | None |
| 214 | Info | Help message | None |
| 220 | Success | Service ready | None |
| 221 | Success | Closing connection | None |
| 250 | Success | Message accepted | None |
| 251 | Success | User not local, forwarding | None |
| 252 | Success | Cannot verify user | None |
| 354 | Redirect | Start mail input | Send message data |
| 421 | Temp Error | Service unavailable | Retry later |
| 450 | Temp Error | Mailbox unavailable | Retry later |
| 451 | Temp Error | Action aborted | Retry later |
| 452 | Temp Error | Insufficient storage | Retry later |
| 500 | Perm Error | Syntax error | Fix command |
| 501 | Perm Error | Syntax error in parameters | Fix parameters |
| 502 | Perm Error | Command not implemented | Use different command |
| 503 | Perm Error | Bad sequence | Reorder commands |
| 504 | Perm Error | Parameter not implemented | Remove parameter |
| 550 | Perm Error | Mailbox unavailable | Verify address |
| 551 | Perm Error | User not local | Use correct server |
| 552 | Perm Error | Exceeded storage | Reduce message size |
| 553 | Perm Error | Mailbox name invalid | Fix address |
| 554 | Perm Error | Transaction failed | Check all settings |
What is an SMTP error code?
Within the SMTP (Simple Mail Transfer Protocol) process, messages are relayed from one mail server to another. SMTP servers send response codes that indicate what has happened to your messages at each stage of the delivery process.
These codes serve multiple purposes. They confirm successful delivery, alert you to temporary issues that will resolve on their own, and identify permanent problems that require intervention. For email administrators and developers, SMTP error codes are essential diagnostic tools that reveal exactly where and why delivery failed.
The first digit of an SMTP code indicates the category:
- 2xx: Success - your message was accepted
- 3xx: Redirection - more information needed to proceed
- 4xx: Temporary failure - retry later
- 5xx: Permanent failure - don't retry without fixing the problem
SMTP success codes (2xx)
Success codes indicate your message was accepted by the recipient server. These are the responses you want to see.
SMTP 211: System status
This informational response provides system status or help information. It's typically triggered by the HELP command and isn't related to message delivery. You'll rarely see this in normal email operations.
SMTP 214: Help message
The server is responding to a HELP command with information about supported commands and syntax. Like 211, this is informational and not part of typical message delivery.
SMTP 220: Service ready
The SMTP server is ready to accept connections and process commands. This is the opening handshake when your mail client first connects to the server. If you don't see 220, the server isn't accepting connections.
SMTP 221: Service closing transmission channel
The server is closing the connection, usually after successfully processing your request. This is the polite goodbye at the end of an SMTP session. Everything completed normally.
SMTP 250: Requested mail action okay, completed
This is the success code you want to see. SMTP 250 means your message was accepted by the recipient server and queued for delivery. The server has taken responsibility for delivering the message to the recipient's mailbox. While 250 indicates successful acceptance, it doesn't guarantee inbox placement—the message could still be filtered to spam or blocked by additional filtering rules.
Common variations:
- "250 OK" - Generic success
- "250 Message accepted for delivery" - Explicitly confirms acceptance
- "250 2.0.0 OK" - Enhanced status code showing success
SMTP 251: User not local; will forward
The recipient's mailbox isn't on this server, but the server will forward your message to the correct destination. This typically happens with mail forwarding rules or when contacting a mail gateway that handles multiple domains.
SMTP 252: Cannot verify user, but will accept message
The server can't verify whether the recipient mailbox exists, but it's accepting the message anyway. This happens when servers disable recipient verification to prevent email harvesting attacks. The message might still bounce later if the address is invalid.
SMTP redirection codes (3xx)
SMTP 354: Start mail input; end with <CRLF>.<CRLF>
This isn't an error. It's the server telling you to proceed with sending the message content after you've provided the MAIL FROM and RCPT TO information. You'll see this in every successful SMTP transaction. The server is ready to receive the message body.
SMTP temporary error codes (4xx)
Temporary errors mean something prevented delivery right now, but the issue should resolve itself. Most mail servers automatically retry 4xx errors.
SMTP 421: Service not available, closing transmission channel
Your message was temporarily deferred by the recipient server. This usually results from too many connections in a short timeframe, too many messages from your IP address, or the server being overwhelmed. The recipient server is essentially saying "slow down, I'm busy."
How to fix it: Wait 15-30 minutes and retry. If you're sending bulk email, reduce your sending rate. Implement exponential backoff in your retry logic.
SMTP 450: Requested mail action not taken: mailbox unavailable
Your message wasn't delivered because the recipient's mailbox was temporarily unavailable. This can happen if the mailbox is locked during maintenance, temporarily over quota, or experiencing technical issues.
How to fix it: Retry after a few hours. If the problem persists beyond 24 hours, contact the recipient through an alternative method to verify their mailbox is functioning.
SMTP 451: Requested action aborted: local error in processing
The message failed due to a temporary problem on the receiving server. This is a catch-all temporary error that indicates something went wrong, but it's not your fault. The server encountered an internal issue while processing your message.
How to fix it: Retry later. This error typically resolves itself. If it persists for multiple days, the recipient's mail administrator needs to investigate their server issues.
SMTP 452: Requested action not taken: insufficient system storage
The recipient server doesn't have enough disk space or system resources to accept your message right now. The server's storage is full or nearly full, preventing it from accepting new messages.
How to fix it: Retry later. The recipient's IT team needs to free up storage space. If you're the sender, consider reducing attachment sizes. If this happens frequently with a particular domain, notify their administrators.
SMTP permanent error codes (5xx)
Permanent errors mean delivery failed and won't succeed without intervention. Don't retry 5xx errors without fixing the underlying problem.
SMTP 500: Syntax error, command unrecognized
The server doesn't understand the command you sent. This typically indicates a problem with your mail client or sending software using incorrect SMTP syntax.
How to fix it: Check your mail client configuration. Make sure you're using proper SMTP commands and syntax. This is usually a software bug, not a configuration issue.
SMTP 501: Syntax error in parameters or arguments
The SMTP command was recognized, but the parameters you provided are malformed. This often happens with incorrectly formatted email addresses or invalid command arguments.
How to fix it: Verify email address formatting. Check that FROM and TO addresses are properly formatted with angle brackets when required. Review your SMTP command syntax.
SMTP 502: Command not implemented
The server doesn't support the SMTP command you're trying to use. You're attempting to use an optional SMTP extension that this server doesn't offer.
How to fix it: Use standard SMTP commands instead of extensions. Check which SMTP features the server supports by reviewing its EHLO response.
SMTP 503: Bad sequence of commands
You sent SMTP commands in the wrong order. For example, trying to send message data before specifying recipients, or using MAIL FROM twice in one session.
How to fix it: Review SMTP protocol flow. The proper sequence is: EHLO → MAIL FROM → RCPT TO → DATA → message content → QUIT. Reset your SMTP session and start over.
SMTP 504: Command parameter not implemented
The command is valid, but one of the parameters you used isn't supported by this server. Similar to 502, but specifically about unsupported parameters rather than commands.
How to fix it: Remove the unsupported parameter. Check the server's capabilities through EHLO and only use supported features.
SMTP 550: Requested action not taken: mailbox unavailable
The message failed because the recipient's mailbox doesn't exist, is disabled, or the server is rejecting your message. This is one of the most common permanent errors. Reasons include:
- Invalid or non-existent email address
- Recipient has blocked your sender address
- Your sender domain is on a blocklist
- The recipient's spam filter rejected your message
- The mailbox is full and not accepting new messages
How to fix it: Verify the email address is correct and currently active. Check if your domain or IP is on any blocklists. Review your message content for spam triggers. If you're sure the address is valid, the recipient may need to whitelist your sender address.
SMTP 551: User not local; please try [address]
The mailbox you're trying to reach doesn't exist on this server. The server may provide a forwarding address. This is similar to 251, but it's a permanent error requiring you to resend to a different address rather than the server forwarding automatically.
How to fix it: Use the correct mail server for this recipient. If an alternate address was provided, use that instead. Update your contact records with the correct email address.
SMTP 552: Requested mail action aborted: exceeded storage allocation
The recipient's mailbox doesn't have enough storage space to accept your message. Their inbox is full. Unlike 452 (temporary server storage issue), this is about the specific user's mailbox quota.
How to fix it: Reduce message size by removing or compressing attachments. Contact the recipient through alternative means to ask them to free up mailbox space. Wait for them to clean out their inbox before resending.
SMTP 553: Requested action not taken: mailbox name not allowed
The email address you're sending to has an invalid format or contains characters that aren't allowed. This could be a typo in the domain name, incorrect syntax, or an address that violates the server's naming rules.
How to fix it: Verify the email address follows proper formatting (username@domain.com). Check for typos in the domain name. Make sure the address doesn't contain prohibited characters or spaces.
SMTP 554: Transaction failed
This is a vague catch-all error that can indicate numerous problems with your message or sending reputation. Common causes include:
- Your IP address or domain is blocklisted
- The message failed spam filtering
- Policy violations (sending to addresses that never opted in)
- Authentication failures (SPF, DKIM, DMARC)
- Malformed message headers or content
How to fix it: Check your sending reputation and blocklist status. Verify your email authentication (SPF, DKIM, DMARC) is properly configured. Review message content for spam indicators. Look at the full error message for additional details about what specifically failed.
SMTP errors vs. bounce messages
SMTP error codes appear during the SMTP conversation between mail servers. Bounce messages are emails sent back to you after an SMTP error occurs. The bounce message usually includes:
- The original SMTP error code
- A human-readable explanation
- The original message or headers
- Suggestions for resolution
Bounce messages come in two types:
- Hard bounces: Permanent delivery failures (5xx codes)
- Soft bounces: Temporary delivery failures (4xx codes)
Monitor bounce rates closely. High bounce rates damage your sender reputation and can lead to deliverability problems across all your email.
Most common SMTP errors and solutions
- SMTP 550 (mailbox unavailable) - Verify address, check blocklists, review spam content
- SMTP 554 (transaction failed) - Fix authentication, improve sender reputation, review content
- SMTP 421 (service unavailable) - Reduce sending rate, implement backoff, try again later
- SMTP 552 (mailbox full) - Reduce message size, contact recipient, wait for mailbox cleanup
- SMTP 450 (mailbox unavailable) - Retry later, verify recipient status, check for maintenance windows
Start sending with Twilio SendGrid
To learn more about these and other SMTP server responses, read our Knowledge Base article. The article provides examples of all these responses as well as offers suggestions for correcting any problems.
Sending email involves multiple computers communicating with each other through a process call Simple Message Transfer Protocol (SMTP). SendGrid functions as an SMTP relay service to send billions of marketing and transactional emails every month.
Sign up for a free account (no credit card required) to start sending!
Frequently asked questions
What is an SMTP error code?
An SMTP error code is a three-digit number that mail servers use to communicate the status of email delivery attempts. The codes indicate whether a message was successfully delivered, temporarily delayed, or permanently rejected. They help diagnose email delivery problems and determine the appropriate next steps.
What does SMTP 250 mean?
SMTP 250 means success. Your message was accepted by the recipient server and queued for delivery. The server has taken responsibility for delivering the message to the recipient's mailbox. While this confirms acceptance by the server, it doesn't guarantee the message will reach the inbox—spam filters may still block it.
What's the difference between 4xx and 5xx SMTP codes?
4xx codes indicate temporary errors that should resolve themselves. The receiving server is asking you to retry later. 5xx codes indicate permanent errors that won't resolve without intervention. Don't retry 5xx errors without fixing the underlying problem first.
Why am I getting SMTP error 421?
SMTP 421 means the server is temporarily unavailable or overwhelmed. You're likely sending too many messages too quickly, or the server is experiencing high load. Wait 15-30 minutes and retry. Reduce your sending rate and implement exponential backoff in your retry logic.
Should I retry after receiving a 5xx error?
No. 5xx codes are permanent errors. Retrying without fixing the underlying problem will waste resources and could damage your sender reputation. Identify and resolve the issue before attempting to resend.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.