SMTP Code 221: Closing Connection
SMTP Code 221 means “Closing Connection.” The mail server is closing the SMTP connection after completing the transaction. This is a normal response to the QUIT command and indicates the conversation has ended successfully.
221 2.0.0 closing connection d75a77b69052e-46c1c0a2f9bsi - gsmtp
What does 221 mean?
SMTP code 221 is sent by the receiving server in response to the QUIT command, indicating that the connection is being closed gracefully. This is the normal ending of an SMTP session and is not a bounce code. Every successful email delivery ends with a 221 response.
If you see 221 in your logs without a preceding 250 (message accepted), it may indicate the connection was closed prematurely. Some servers send 221 with an error message when they are shutting down or rejecting connections due to maintenance, in which case the full response text will provide more context.
How 221 plays out
221: the step succeededCommon causes of 221
- Normal SMTP session termination after QUIT command
- Connection closed gracefully after successful delivery
- Server shutting down for maintenance (when premature)
How to fix 221
- No fix needed for normal 221 responses
- If connections are dropping with 221 before delivery completes, check for server timeout settings
- Review SMTP logs to ensure 250 OK was received before the 221 close