.. method:: SMTP.quit()
- Terminate the SMTP session and close the connection.
+ Terminate the SMTP session and close the connection. Return the result of
+ the SMTP ``QUIT`` command.
+
+ .. versionchanged:: 2.6
+ Return a value.
+
Low-level methods corresponding to the standard SMTP/ESMTP commands ``HELP``,
``RSET``, ``NOOP``, ``MAIL``, ``RCPT``, and ``DATA`` are also supported.
def quit(self):
"""Terminate the SMTP session."""
- self.docmd("quit")
+ res = self.docmd("quit")
self.close()
+ return res
if _have_ssl:
Core and builtins
-----------------
-- Patch #2477: Added from __future__ import unicode_literals
+- Patch #2477: Added from __future__ import unicode_literals.
- Added backport of bytearray type.
Library
-------
+- Issue #2248: return the result of the QUIT command. from SMTP.quit().
+
- Backport of Python 3.0's io module.
- Issue #2482: Make sure that the coefficient of a Decimal is always