What Are SMTP Response Codes?

SMTP, or Simple Mail Transfer Protocol, is the standard protocol for sending emails from one computer to another. When you hit the “send” button, you’re actually activating the SMTP protocol to relay your message to the intended recipient. It works like this:

  • Your email client connects to its assigned SMTP server.

 

  • The server authenticates the connection.

 

  • After authentication, the two parties exchange a series of protocol commands and responses. This is called an SMTP session. As a result, the message is either transferred to the server or rejected for some reason.

 

  • Your SMTP server then connects to the recipient’s one to pass the email over. Another SMTP session takes place.

 

In response to each SMTP command the “caller party” issues, it receives a code indicating the outcome of the request. We’ll explain what these codes are and what they mean.

SMTP Response Codes

Each code consists of three digits. The first one indicates the category.

  • 1XX: The server accepted the request but didn’t take any action.
  • 2XX: The server accepted the request and completed the job.
  • 3XX: Additional information is needed to complete the request.
  • 4XX: Temporary failure, try again later.
  • 5XX: Permanent error, something is wrong and needs to be fixed.

The second digit tells you why you got the response.

  • X0X: Syntax errors and commands that don’t fit a single category.
  • X1X: A reply to an information request.
  • X2X: A reply related to the message transmission channel.
  • X3X and X4X: Uncategorized and unspecified responses.
  • X5X: The response indicates the status of the mail receiver system.

The third digit acts as a modifier.

As a rule, a response code is followed by a line of text with a human-readable description of the status. It may come in handy for pinpointing errors and may be found in the SMTP server’s logs.

Common SMTP Codes

The most common SMTP codes you will encounter include:

General status codes

  • 214: A response to the HELP command, often includes a link to the FAQ page.

 

  • 220: The recipient’s server is ready for the next instruction.

 

  • 221: The SMTP connection is being severed.

 

  • 235: Successful authentication.

 

  • 250: Your email was delivered successfully. 

 

  • 251: The receiving server does not recognize the target address as local but will forward it to another server.

 

  • 252: The recipient’s email address is not recognized, but the message will be delivered anyway.

Temporary Error Codes

It should be noted that these codes are often treated a bit differently across various SMTP providers. See the accompanying line of text for exact details.

  • 421: The SMTP service is not available at the moment.

 

  • 450: The recipient’s mailbox is temporarily blocked from receiving mail.

 

  • 451: Unable to process your message due to a local error.

 

  • 452: Receiving servers are out of space or overloaded.

 

  • 455: The commands from your SMTP servers cannot be processed at a specific time.

Permanent Error Codes

  • 500: The recipient’s servers do not recognize your command.

 

  • 501: Command was recognized, but there are errors related to its parameters.

 

  • 502: Command not supported by the receiving server.

 

  • 503: Bad sequence of commands.

 

  • 521: The server does not accept mail.

 

  • 535: Invalid authentication credentials.

 

  • 541: Sender’s message was flagged as spam or blocked by the recipient’s rules.

 

  • 554: Transaction failed, e.g., because your email is on a block list.

How To Resolve SMTP Errors

  • Use email authentication to help the recipient’s client verify emails from your address. Popular authentication technologies include Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), and Domain-based Message Authentication, Reporting and Conformance (DMARC).

 

  • To solve connection problems, try changing the SMTP port in current use.

 

  • Ensure your email client has a stable and uninterrupted connection to its assigned server.

Conclusion

SMTP response codes provide important information related to the state of your communication. We have explained how to decipher these codes and provided descriptions for the most common ones you’ll encounter. We also offered advice on resolving errors.

Leave a Comment