Merge #22215: have the smtplib 'quit' command reset the state.

This commit is contained in:
R David Murray 2014-08-30 16:55:45 -04:00
commit b10be15508
3 changed files with 23 additions and 0 deletions

View file

@ -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