Everything you need to know about SMTP Status Codes
SMTP (Simple mail transfer protocol) is used to send emails across networks with the help of MTA’s (Mail transfer agents). Based on the outcome of the request, the client’s server returns a particular returns a particular SMTP code. These response codes might be one of the five standard classes.
Status codes are differentiated into five categories as follows :
- 1xx returns informational code ie. your request is received successfully and sent for further processing.
- 2xx returns success code ie. your request is understood and accepted.
- 3xx returns redirection code ie. your request needs few actions to be taken so that request is completely accepted.
- 4xx returns clients error code ie. your request is incorrect, there might be syntax issue or it contains an reqyest that can’t be fulfilled.
- 5xx returns server error code ie. your request was valid but the server failed to process it due to an internal error on the server.
Informative Status Code
Unable to connect to server
Success Status Code : whenever a positive delivery code is returned from DSN
System status message
A response to the HELP command
The server is ready
The mail communication channel is getting closed
Requested mail action okay completed
The mail will be forwarded because the server was not able to find user on local
Cannot verify the user, but it will try to deliver the message anyway
Redirection Status Code
Start adding mail input
Persistent transient failure Status Code
Timeout connection problem
Service is unavailable due to a connection problem
The recipient’s mailbox has exceeded its storage limit
Not enough space on the disk
Recipient’s incoming mail queue has been stopped
The recipient’s server is not responding
The connection was dropped during the transmission
The maximum hop count was exceeded for the message
Message timed out because of issues concerning the incoming server
User’s mailbox is unavailable
Aborted – Local error in processing
Too many emails sent or too many recipients
An error of your mail server
Server Permanent Error Codes
Syntax error in parameters or arguments
Bad sequence of commands, or requires authentication
Command parameter is not implemented
510 / 511
Bad email address
Host server for the recipient’s domain name cannot be found in DNS
Address type is incorrect
Size of your mail exceeds the server limits
The recipient address rejected your message
Non-existent email address
User not local or invalid address – relay denied
Exceeded storage allocation
Mailbox name invalid
Transaction has failed
Diving deep with extented code description
This is a Success status which indicates that there is a positive response from the server which might have more information if the response contains an associated subcode (2XX X.X.X).
250 2.1.5 Destination address valid or 250 2.1.5 Recipient OK
This should be treated as a positive remark for delivery. Since the status code response represents that the email address you are trying to reach is valid.
221 \ Service closing transmission channel
If there is an issue with authentication this is the status code response received from the server. It can be an incorrect password or username or you might be trying the connect to the wrong mail server. You can check whether SMTP access is enabled for sending email from your email id or try changing the authentication method.
If you are confident that your username and password are correct and still get the error, try using SSL/TLS.
250 2.3.0 Other or undefined mail system status
This can be considered a positive response because this status code response indicates that the recipient’s mail server has successfully received your email but has reverted with null response.
250 2.3.6 Requested priority was changed
The email has been accepted for delivery but the delivery priority was changed. The new priority will available after the status code, in the response.
220 2.5.0 Requested mail action okay completed
This is a success status which indicates your email has been successfully delivered at the recipient’s end without any issue.
This status code indicates a temporary blockage for your email delivery which should retry sending automatically. This blockage might be due to unusual traffic patterns from the sending server IP address, emails having characteristics of spam or recipients mail server is too busy accepting emails.
421 4.7.0 [TS01] Messages from x.x.x.x temporarily deferred due to user complaints – 126.96.36.199
This status code indicates errors when a user raises complaints for the emails which have been sent from your mail server.
421 4.7.0 [TS02] Messages from x.x.x.x … deferred due to excessive user complaints – 188.8.131.52
This status code indicates errors when a user raises complaints for the emails which has been sent from your mail servers on a shared IP.
421 4.7.1 [TS03] All messages from x.x.x.x permanently deferred
This status code indicates that a high volume of mail has been sent from your IP. ie, bulk emailing. Don’t send email if you are receiving this status code.
Check for email subscription list and make sure you are sending emails to user who are subscribed.
421 Message temporarily deferred – [numeric code]
This status code response indicates your emails are postponed due to low connectivity percentage to the mail server, bad tokens within the message or unusual traffic, such as emails having PDF files in them.
421 Resources temporarily unavailable. Please try again later
The recipient’s mail server is too busy. Try to resend those emails in a few minutes.
451 Message temporarily deferred – [numeric code]
This Status code is due to excessive traffic or IP data query failure.
5.0.0 Address does not exist
Email id invalid or does not exists
5.1.0 Other address status
A problem occurred during the delivery of this message to this email address.
5.1.1 Bad destination mailbox address
Specified from address or domain mailbox does not exists (anything after ‘@’).
5.1.2 Bad destination system address
Address does not exists or not able to accept mails
5.1.3 Bad destination mailbox address syntax
Invalid or corrupted character in email address
5.1.4 Destination mailbox address ambiguous
Check your spelling of email address and resend
5.1.5 Destination mailbox address invalid
Mail address may be invailid or may have spelling mistakes.
5.1.6 Mailbox has moved
Mailbox may be moved to new location
5.1.7 Bad sender’s mailbox address syntax
Sender’s address is invalid syntactically
5.1.8 Bad sender’s system address
Sender’s system in the address does not exist or is incapable of accepting.
5.2.0 Other or undefined mailbox status
This error is usually return for which it has class (ie. 1xx,2xx,3xx,4xx,5xx).
5.2.1 Mailbox disabled, not accepting messages
Some changes need to made mandatory for resending mail
5.2.2 Mailbox full
Try increasing your emailbox space capacity
5.2.3 Message length exceeds administrative limit.
The Size of your email has exceeded its limit try removing unwanted text.
5.2.4 Mailing list expansion problem
mailbox saves your email address to whom you are sending or receiving emails, there is problem saving that email addresses.
5.3.0 Other or undefined mail system status
Mail has been accepted normally
5.3.1 Mail system full
mail system at client’s is not able accept emails
5.3.2 System not accepting network messages
you need to whitelist the email address through your administrator it has been blocked.
5.3.3 System not capable of selected features
5.3.4 Message too big for system
Message character limit has exceeded
5.4.0 Other or undefined network or routing status
Mail accepted routing status is not available
5.4.1 No answer from host
Configuration issue at recipient’s server. you can send again once the issue is resolved at recipient’s end
5.4.2 Bad connection
unable to connected or delay in connection
5.4.3 Routing server failure
Error is generated by the sender’s server, you need to contact your ISP/ESP.
5.4.4 Unable to route
When emailid or hosts provided is invalid.
5.4.5 Network congestion
Multiple connection on single channel.
5.4.6 Routing loop detected
Sending message to same PMTA from you have sent.
5.4.7 Delivery time expired
Mail is queued for 2-3 days after that it is removed by returning above messagae
5.5.0 Other or undefined protocol status
Something went wrong with protocol while delivering mail which can be well expressed with other status code.
5.5.1 Invalid command
out of sequence or unsupported command used while sending mail
5.5.2 Syntax error
unable to interprete the command due wrong syntax or it is unrecognized.
5.5.3 Too many recipients
Number of recipient is greater than the amount of recipient deliver by protocol
5.5.4 Invalid command arguments
the arguments were out of range or represented unrecognized features
5.5.5 Wrong protocol version
protocol version is mis-match which can’t be solved at one go.
5.6.0 Other or undefined media error
Issue with content of the message which cannot be delivered.
5.6.1 Media not supported
Media is not supported by protocol or the system who is going to formard the mail.
5.6.2 Conversion required and prohibited
Message should be converted before it is send/delivery else it will be not delivered.
5.6.3 Conversion required but not supported
Message must be converted in order to be forwared but partically it is not possible.
5.6.4 Conversion with loss performed
This is Warning to the sender that While conversion data may be lost.
5.6.5 Conversion failed
Message conversion was unsuccessful
5.7.0 Other or undefined security status
Something went wrong while validating authentication which can be expressed with other status code.
5.7.1 Delivery not authorized, message refused
Authentication was not successful due to which email was not sent.
5.7.2 Mailing list expansion prohibited
Sending mail is not allowed to particular recipient.
5.7.3 Security conversion required but not possible
Conversion was required to send mail securely which is not possible.
5.7.4 Security features not supported
Authentication not supported at delivery end.
5.7.5 Cryptographic failure
Unable to decrypt the message because the key was wrong or invalid.
5.7.6 Cryptographic algorithm not supported
Unable to decrypt the message because alogrithm was not supported.
5.7.7 Message integrity failure
The message is corrupted or altered
This in-depth and informative article was written by Vikram Sahu, and the original can be found at https://netcorecloud.com/tutorials/smtp-code-library/