Sending transactional emails from your website or app?: Try our new SMTP Relay feature for free! Learn More
Close

SMTP error codes: what they mean

When an SMTP send fails, an error code is returned by the server to indicate the nature of the problem. This article explains what the most common error codes mean and how to respond in each case.

What it's used for

Understanding error codes allows you to:

How it works

SMTP error codes follow a standard structure. The first digit indicates the type of response:

Error codes by category

Authentication errors

Code Message What it means
535 5.7.8 Authentication credentials invalid The username or password is invalid
538 5.7.0 Must issue a STARTTLS command first Your application is attempting to authenticate without a secure connection
530 5.7.0 Authentication required A send command was issued before authentication
535 5.7.8 Authentication blocked due to too many failed attempts Too many failed attempts — your IP address is temporarily blocked. Wait a few minutes before trying again and make sure you have the correct credentials
535 5.7.8 SMTP relay is not enabled for this account The SMTP relay service is not enabled on your account. Contact our support team to activate it.

 

Errors related to service limits

Code Message What it means
452 4.2.2 Quota exceeded for the current period The monthly quota of your plan has been reached
452 4.5.3 Too many recipients (max 50 per message) The message exceeds the limit of 50 recipients
454 4.7.0 Too many active sessions for user Your SMTP user has reached its simultaneous connection limit. Close unnecessary connections and try again
454 4.7.0 Too many active sessions for account Your account has reached its simultaneous connection limit. Close unnecessary connections and try again
454 4.7.0 Too many active sessions for IP address. Please retry later. Too many simultaneous connections from the same IP address. Wait a moment and try again.

 

Errors related to addresses

Code Message What it means
501 5.5.4 Bad sender address syntax The sender address is not valid
501 5.5.4 Recipient rejected: bad recipient address syntax The recipient address is not valid

 

Errors related to message content

Code Message What it means
523 5.3.4 Message size exceeds fixed maximum message size The message size exceeds 20 MB
550 5.6.0 Failed to parse MIME structure The message structure is invalid or an attachment is corrupted. This often occurs when a file's content does not match its extension (e.g., a file renamed to .pdf that is not actually a PDF). Check your attachments
554 5.6.0 Multiple header From: addresses is not supported The From field contains more than one address
554 5.6.0 Header From: address domain does not match authenticated user domain The sender's domain does not match the authenticated SMTP user's domain

 

Errors related to the domain

Code Message What it means
550 5.6.0 The domain is not correctly authenticated The domain used is not properly configured or validated

 

Temporary system errors

Code Message What it means
421 4.4.2 Temporary local problem: unable to relay message Temporary system issue — try again later
421 4.4.2 Temporary local problem: unable to connect to upstream relay Temporary relay connection issue — try again later
421 4.7.0 Closing connection due to inactivity The connection was closed by the server after 120 seconds of inactivity. Re-establish the connection to resume sending.
421 4.7.0 Session lifetime exceeded, closing connection The maximum session duration (30 minutes) was reached. Your application must open a new connection to continue sending.
421 4.7.0 Too many messages per session, closing connection The maximum number of messages per session (20) was exceeded. Configure your application to open a new connection after reaching this limit. This can occur when your application uses SMTP connection pooling.

The limits shown in the table above are subject to change without notice.

 

What to do when an error code appears

Depending on the code received, here are the checks to perform:

If the problem persists, note the exact code and contact our support team.

 

See also:

Top