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 9395ca4 commit 779e7c9Copy full SHA for 779e7c9
1 file changed
Lib/smtplib.py
@@ -255,6 +255,7 @@ def __init__(self, host='', port=0, local_hostname=None,
255
if host:
256
(code, msg) = self.connect(host, port)
257
if code != 220:
258
+ self.close()
259
raise SMTPConnectError(code, msg)
260
if local_hostname is not None:
261
self.local_hostname = local_hostname
0 commit comments