221

SMTP Code 221: Closing Connection

Success Low severity Success RFC 5321
What it means

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.

At a glance
Code221
Bounce typeNot a bounce
SeverityLow
CategorySuccess
What to doNone; the delivery step succeeded
StandardRFC 5321
What it looks like in your mail logs
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

Your server connects and sends a command
The recipient responds 221: the step succeeded
The SMTP conversation continues toward delivery

Common 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

Frequently asked questions

What does SMTP 221 "Service closing transmission channel" mean?
SMTP 221 means the server is properly ending the SMTP session and closing the connection. It is the normal response to the QUIT command, indicating all processes have completed and the server is returning to its waiting state. This is a positive response code, not an error; it simply confirms the email conversation has concluded successfully.
Is SMTP 221 an error?
No, SMTP 221 is not an error. It is frequently misconstrued as an error condition, but it simply means the mail server has processed everything in the current session and is closing the connection. Every normal SMTP session ends with a 221 response after the QUIT command. If your email was sent successfully before the 221, your message is on its way.
Why did I receive SMTP 221 before my email was sent?
If you receive a 221 response before completing your email transmission, the server is prematurely closing the connection. This can happen due to session timeouts from slow connections, exceeding the server's maximum session time, authentication failures, or the server detecting a policy violation. Check your SMTP authentication settings and ensure your network connection is stable enough to complete the transaction promptly.
Reviewed by Jennifer Jackson, Email Deliverability Analyst · June 2026 ← All bounce codes