SMTP response codes can be used to help determine why an email bounced, or why you’re receiving an SMTP error when sending an email.
But, if you’re not well versed in the language of SMTP, then making sense of all of these SMTP codes can be overwhelming.
That’s why in this blog post, we’re going to give you 21 of the most common SMTP response codes.
First, let’s start by discussing what an SMTP response code is.
The Anatomy of an SMTP Response Code
In our recent blog post, ‘what does an SMTP error mean’, we explain that when your email program makes a request, the receiving mail server will return a code indicating the status of the message. This code is known as an “SMTP response code.”
An SMTP response code consists of three digits:
- 1) The error code class: This first digit indicates whether or not the server accepted the command. There are five possible values ranging from 1-5. Each value defines whether the server has accepted the command, fulfilled an action, run into a temporary issue, encountered an error, etc.
- 2) Subject: The second digit in the SMTP response code gives you more information, stating whether there was a syntactic problem, connection trouble, or something else.
- 3) Detail: The last number provides even more information about the mail transfer status.
Now that you have a basic understanding of what an SMTP response code is, here are 21 common SMTP response codes, as laid out in RFC 821 (RFC stands for Request for Comments documents and has been used for more than 40 years as a way to define new standards and share technical information, such as how SMTP relaying works).
21 Common SMTP Response Codes
Part of the inherent problem with SMTP codes is that different servers use the codes in different ways, making it impossible to state with certainty the meaning of each code. As you read through each response code below, keep in mind that the meaning could vary depending upon how your mail server was set up.
- 1) 220 — SMTP Service ready. This is a general reply stating that the SMTP server is ready to continue forward with the next command.
- 2) 221 — Service closing. This response states that the session or connection to the mail server is ending and all processes are complete. The end result could be either a success or failure.
- 3) 250 — Requested action taken and completed. This is the best message for a sender to receive because it indicates that the SMTP communication was successful. SMTP response code 250 is also the most common response code in SMTP since it is issued in response to every accepted command (likely 4 to 6 times per message).
- 4) 354 — Start message input and end with … This indicates that the server is ready to accept the message itself.
- 5) 421 — The service is not available and the connection will be closed. If you receive ‘SMTP error (421) connection server failed’, then think of this as an open ended error, which is most typically related to the destination server not being “reachable.” However, it may also mean that your sending mail server is not “reachable.” If you’re using a remote mail server for sending, you’ll want to ensure that it’s working properly and the connections are successful. You can test your SMTP connection with this tool.
- 6) 450 — The requested command failed because the user’s mailbox was unavailable (for example because it was locked) try again later. There can also be some additional meanings to this response code such as:
a) The email account no longer exists on the recipient mail server
b) The email account does not have permission to receive the email
c) The recipient mail server rejected the email due to a blacklisting or filtering
How to Fix SMTP Error 450:
- Verify that the email account that you’re trying to reach exists
- Check your mail server’s IP address for blacklisting. At SocketLabs, we highly recommend MX Toolbox for running a blacklist check
- If your email appears to be spammy, then remove any spammy content from the message
- If you’re using an attachment, then try sending the email without the attachment
- 7) 451 — The command has been aborted due to a server error. This is usually not your fault because the receiving mailserver’s rules may have prevented the mail from processing.
- 8) 452 — The command has been aborted because the server has insufficient system storage. This is usually caused by overloading your mail server when attempting to send too many messages at once. To fix this issue, review your mail queue and use an appropriate sending rate
- 9) 455 — The server cannot deal with the command at this time. If you receive this message, then allow time for more attempts. If unsuccessful, then contact the administrator on the recipient mail server’s side.
- 10) 500 — The server could not recognize the command due to a syntax error. This response could be caused by antivirus or firewall software. To confirm that this is the case, try disabling each to test the connection.
- 11) 501 — A syntax error was encountered in command arguments. This is similar to SMTP response code 500. However, a 501 response is often caused by an incorrect/invalid email address.
- 12) 502 — This command is not implemented. If you receive this response, then you’re most likely experiencing a configuration issue with your underlying MTA. Review your MTA’s configuration and try connecting again.
- 13) 503 — The server has encountered a bad sequence of commands. This response indicates that the parameters being used are out of order from what the mail server is expecting, which commonly happens when not authenticating an email account. To resolve this error, verify that your email account is authenticating properly and ensure all MTA configurations are in order.
- 14) 504 — A command parameter is not implemented. This is very similar to SMTP response code 502.
- 15) 521 — This host never accepts mail; a response by a dummy server. This response simply means that the recipient mail server does not accept and deliver email. To fix the SMTP 521 Error, check to ensure that the message is actually failing and not being relayed.
- 16) 541 — The message could not be delivered for policy reasons — typically a spam filter (only some SMTP servers return this error code.) If you receive this SMTP response, then it means that your email may have been flagged as spam. Confirm that your server is not sending spam and is not on any blacklists.
The following 500 SMTP response codes are some of the most important SMTP response codes that you need to be aware of.
- 17) 550 — The requested command failed because the user’s mailbox was unavailable for example because it was not found, or because the command was rejected for policy reasons.
In addition, SMTP response code 550 is also commonly used to indicate additional instances of permanent failures. For example, “550 The mail server detected your message as spam and has prevented delivery.”
- 18) 551 — The recipient is not local to the server. The server then gives a forward address to try. This is commonly used as a strategy for spam prevention.
- 19) 552 — The action was aborted due to exceeded storage allocation. This is usually due to the recipient’s mail server being too full. This could either be because the recipient doesn’t check their email, or in some more extreme situations, the recipient is a victim of mail bombing.
- 20) 553 — The command was aborted because the mailbox name is invalid. In this case, the mailbox was unable to verify the email address. Check to ensure that all the email addresses that you’re sending to are correct.
- 21) 554 — delivery error: Sorry, you’re message cannot be delivered. This mailbox is disabled. If you receive SMTP code 554, then this is just a normal invalid address response. Check the email address and try again.
Here’s What to Do When You Encounter an SMTP Response Code
First, don’t panic!
An SMTP response code is just a simple way for servers to communicate with each other.
If you receive an SMTP response, then the first step is to ask yourself why you’re receiving a response. This usually starts with some simple research.
To make research easier, we highly suggest that you bookmark this page for quick and easy reference when you run into an SMTP response code in the future.
You’ll find that in most cases, you probably won’t need to take any action.
However, if you receive an SMTP error due to an invalid address or permanent failure, then it’s going to be a good idea to remove the failed addresses from your email list so you don’t repeatedly send to the same bad email addresses in the future. This is because sending to bad email addresses will tarnish your sender reputation.
If you’re using an SMTP relay service like SocketLabs, then we’ll automatically add bad email addresses to a Suppression List for you.
This wraps up our post about some of the most common SMTP response codes that you may encounter when sending email. You should now have a basic understanding about the meaning of some common SMTP response codes and how to address them.
Here are some additional resources that you might find helpful:
What does an SMTP Error Mean