We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1abcf67 commit 9e98cd0Copy full SHA for 9e98cd0
1 file changed
Lib/smtplib.py
@@ -250,6 +250,7 @@ def __init__(self, host='', port=0, local_hostname=None,
250
if host:
251
(code, msg) = self.connect(host, port)
252
if code != 220:
253
+ self.close()
254
raise SMTPConnectError(code, msg)
255
if local_hostname is not None:
256
self.local_hostname = local_hostname
0 commit comments