221

SMTP Error 221: Closing Connection

Informational Low Severity Success RFC 5321

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.

What Does Error 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.

Common Causes

  • Normal SMTP session termination after QUIT command
  • Connection closed gracefully after successful delivery
  • Server shutting down for maintenance (when premature)

How to Fix Error 221

  1. No fix needed for normal 221 responses
  2. If connections are dropping with 221 before delivery completes, check for server timeout settings
  3. Review SMTP logs to ensure 250 OK was received before the 221 close
Check your domain: Use our Sender Reputation Checker to verify your email authentication, check blacklists, and get your free Sender Reputation Score.

Frequently Asked Questions

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.

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.

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.

Related Bounce Codes

← Back to All Bounce Codes