SMTP error codes and what they mean
If you send emails at scale, SMTP errors are bound to pop up. But decoding them does not have to be confusing. This guide explains what SMTP error codes mean, how to fix common problems, and how Mailgun helps make sense of it all.
PUBLISHED ON
Email seems kind of magical, until it breaks. You hit send and expect your message to reach the inbox, but sometimes, it bounces back with a cryptic error message. There are many types of errors since there are many pieces to the email puzzle that make the magic happen. Bounce errors get brought up quite a bit but what about SMTP errors?
SMTP, or Simple Mail Transfer Protocol, is the language servers use to talk to each other when sending emails. When something breaks during that conversation, the server returns a code to explain what happened.
These status codes offer valuable insights, helping you figure out what went wrong and how to fix it. From temporary glitches to permanent failures, SMTP codes help you stay on top of your email delivery.
Table of contents
02Common SMTP errors explained
03Bonus: enhanced status codes
How SMTP codes work
SMTP codes are short – just three digits – but packed with meaning.
The first digit tells you the type of response:
2 means success: The requested action was completed.
4 signals a temporary problem: You can try again later.
5 means permanent failure: You need to fix something before retrying.
The second and third digits offer more detail, pointing to specific issues like authentication, routing, or mailbox problems.
Reading SMTP codes is like learning a simple language. Once you get it, troubleshooting gets easier and faster.
Want to know more about SMTP and how it works? If you’re an email geek like us, the answer is yes. Check out our post on what is SMTP and how does it work to learn more.
Common SMTP errors explained
While there are many codes out there, some show up more often. Let’s walk through key types of SMTP responses and what they mean.
Temporary issues
Temporary errors suggest a short-term problem. In most cases, trying again later works. For example, if you see 421 service not available, the receiving server might be temporarily offline or too busy. A 450 mailbox unavailable error means the recipient’s inbox is full or temporarily disabled. Timeouts, like 447 timeout occurred, often point to server or connection issues that should resolve quickly.
Permanent failures
Permanent errors signal that something must be fixed before the email can be sent again.
A 550 mailbox unavailable error means the address does not exist. 553 mailbox name not allowed often indicates a formatting issue or that the domain is rejecting your message. And 554 transaction failed may mean your message hit a spam filter or was blocked by the recipient’s server.
Bonus: enhanced status codes
Some servers use enhanced SMTP codes to provide extra details. These codes, such as 5.1.1 bad destination mailbox address, are more specific and help zero in on problems like typos or invalid domains.
Understanding both basic and enhanced codes gives you full visibility into email issues.
SMTP response codes, decoded
At first glance, SMTP errors seem complicated. But with a little guidance, they become clear signals that help you fix issues fast. From syntax mistakes to blocked domains, reading these codes helps keep your email program running smoothly and your messages landing in inboxes.
Complete SMTP error codes list
Here is a list of SMTP error codes you may encounter, and some quick solutions that may help.
Code | What it means | How to fix it |
---|---|---|
Code | ||
101 | The connection failed due to an invalid SSL or TLS configuration. | Review your server's security settings and verify SSL/TLS certificates are valid and correctly installed. |
What it means | ||
111 | The sending server was unable to connect to the remote SMTP server. | Check the network connection, firewall rules, and ensure the recipient server is online and accepting connections. |
How to fix it | ||
221 | The domain’s server is closing the transmission channel — this usually happens after a successful email session. | No action needed. This is normal when communication is complete. |
250 | The requested action was completed successfully. | No fix required — this means your email was accepted. |
420 | A firewall or filter blocked the email before it could be delivered. | Review recipient policies, spam filters, and IP reputation to ensure your emails are allowed through. |
421 | The recipient's mail server is temporarily unavailable or busy. | Wait and retry later. If persistent, contact the recipient's server admin. |
422 | The recipient’s mailbox has exceeded its storage quota. | Ask the recipient to clear space or wait until they resolve the issue. |
431 | There is not enough storage or memory available to process the message. | Retry later or contact the recipient server administrator to resolve capacity issues. |
441 | The connection was dropped before the server could finish processing the message. | Check network stability and retry. |
442 | The server started processing the message but the connection was unexpectedly closed. | Investigate possible network interruptions or server-side timeouts. |
446 | The message has looped through too many servers and was rejected. | Review mail routing rules and verify correct MX records. |
447 | The sending server experienced a timeout while waiting for a response. | Retry sending later and check for connectivity or server load issues. |
449 | A DNS lookup failed during the delivery attempt. | Check the recipient domain’s DNS configuration and retry later. |
450 | The mailbox is temporarily unavailable — often due to being full or inactive. | Retry after some time or verify the recipient email address. |
451 | The server encountered a local error while processing the email. | Retry later. If persistent, contact the recipient’s email administrator. |
452 | The receiving server does not have enough storage to accept your message. | Wait and retry. For persistent issues, notify the recipient. |
454 | TLS encryption is required but unavailable at the moment. | Check your server's TLS settings or retry later when the recipient server supports encryption. |
471 | The message was blocked by an anti-spam or firewall rule. | Check your sending IP and content for spam triggers and remove problematic elements. |
500 | The command sent was unrecognized or formatted incorrectly. | Verify the SMTP commands and check for typos or syntax errors. |
501 | The parameters or arguments provided are not valid. | Review the recipient email address and command syntax. |
502 | The command used is not supported by the receiving server. | Review the protocol compatibility and avoid unsupported commands. |
503 | Commands were sent out of order or at the wrong time. | Review the sequence of SMTP commands and adjust your sending logic to follow the correct order. |
504 | The command parameter provided is not supported by the server. | Remove unsupported parameters or adjust for compatibility with the recipient server. |
510 | The recipient address was invalid or incorrectly formatted. | Verify the email address for typos or errors. |
511 | The recipient’s mailbox does not exist. | Double-check the recipient’s email address or confirm with them directly. |
512 | The domain part of the recipient address does not exist. | Verify the domain's DNS records or correct any typos in the email address. |
513 | The server does not allow relaying or the address type is incorrect. | Confirm relaying permissions or correct the address format. |
515 | The destination mailbox address is invalid. | Confirm the recipient’s email address and fix any issues. |
517 | The sender’s mail attributes are incorrect or unsupported. | Review and correct the sender's address and settings. |
521 | The recipient domain does not accept incoming mail. | Contact the domain owner or choose an alternative contact method. |
522 | The recipient has exceeded their mailbox limit. | Ask the recipient to free up space or retry later. |
523 | The email is too large for the receiving server to accept. | Reduce attachment size or compress the email content and resend. |
530 | Authentication is required to send email to this server. | Configure and provide valid SMTP authentication credentials. |
531 | The mail system is full and cannot accept more messages. | Wait and retry later or notify the recipient. |
533 | The remote server does not have enough disk space to store the email. | Retry later or contact the recipient’s server administrator. |
534 | The authentication mechanism used is too weak for this server’s policy. | Upgrade to a stronger authentication method such as STARTTLS or SSL. |
535 | Authentication is required but missing or invalid. | Review your SMTP username and password and ensure proper configuration. |
538 | Encryption is required for the authentication process, but was not provided. | Enable encryption (TLS/SSL) and try sending again. |
540 | The recipient's domain does not have DNS records for email handling. | Check the domain’s DNS records or contact the domain administrator. |
541 | The recipient’s server did not respond to the delivery attempt. | Retry later or investigate possible network issues. |
542 | The connection was rejected due to poor connection quality. | Retry sending or check your network connection. |
543 | The routing server failed to find a valid delivery path. | Review domain DNS and MX records or contact the recipient domain administrator. |
546 | The email looped between servers and was rejected. | Review mail routing settings to prevent looping scenarios. |
547 | Delivery timed out after multiple failed attempts. | Retry later or investigate server availability. |
550 | The requested action was not taken because the mailbox is unavailable. | Verify the recipient address or contact the recipient directly. |
551 | The user is not local to the recipient server and forwarding is not set up. | Request an updated email address or confirm forwarding is configured. |
552 | The recipient’s mailbox has exceeded its allocated storage space. | Ask the recipient to clear mailbox space or retry later. |
553 | The mailbox name is invalid or not allowed by the server. | Correct the recipient’s email address or check domain restrictions. |
554 | The transaction failed due to a policy or spam-related rejection. | Review message content, IP reputation, and ensure compliance with sending best practices. |
555 | The SMTP protocol version used is not supported by the recipient server. | Update your email server to use a compatible SMTP version. |
556 | The email sent is too large for the recipient server to handle. | Reduce the message size or use file-sharing links instead of large attachments. |
Wrapping up
SMTP error codes may seem complex at first, but they play a big role in helping you understand and troubleshoot email delivery issues. By learning what these codes mean and how to act on them, you can reduce failed sends, improve performance, and keep your email program running smoothly.