See
RFC 1939[
^].
The reason of the failure is usually send with the
-ERR
response.
The
QUIT
command may fail if the server can't delete messages that has been marked for deletion with the
DELE
command. You must assume that no or not all marked messages has been deleted. A new connection should be established without problems.
The
QUIT
command may also fail if the connection has not been established before (a prior login command returned with an error).