mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merge #22215: have the smtplib 'quit' command reset the state.
This commit is contained in:
commit
b10be15508
3 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue