summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-08-30 20:55:45 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-08-30 20:55:45 (GMT)
commitb10be1550850f82e3dc716b8bf2dea4a85c963d7 (patch)
treec79020dd241fdad9cd500f483cea14b953fbb1fd /Lib/smtplib.py
parent5ce8f35931402661fa39c0f2dab44354f2a1d677 (diff)
parent0cff49fcf9b5689a8940c318ea0d846317f3a7d3 (diff)
downloadcpython-b10be1550850f82e3dc716b8bf2dea4a85c963d7.zip
cpython-b10be1550850f82e3dc716b8bf2dea4a85c963d7.tar.gz
cpython-b10be1550850f82e3dc716b8bf2dea4a85c963d7.tar.bz2
Merge #22215: have the smtplib 'quit' command reset the state.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index e62304a..6676af8 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -891,6 +891,10 @@ class SMTP:
def quit(self):
"""Terminate the SMTP session."""
res = self.docmd("quit")
+ # A new EHLO is required after reconnecting with connect()
+ self.ehlo_resp = self.helo_resp = None
+ self.esmtp_features = {}
+ self.does_esmtp = False
self.close()
return res