MCPcopy Index your code
hub / github.com/python/cpython / close

Method close

Lib/smtplib.py:990–1001  ·  view source on GitHub ↗

Close the connection to the SMTP server.

(self)

Source from the content-addressed store, hash-verified

988 rcpt_options)
989
990 def close(self):
991 """Close the connection to the SMTP server."""
992 try:
993 file = self.file
994 self.file = None
995 if file:
996 file.close()
997 finally:
998 sock = self.sock
999 self.sock = None
1000 if sock:
1001 sock.close()
1002
1003 def quit(self):
1004 """Terminate the SMTP session."""

Callers 15

__init__Method · 0.95
__exit__Method · 0.95
sendMethod · 0.95
getreplyMethod · 0.95
ehloMethod · 0.95
sendmailMethod · 0.95
quitMethod · 0.95
testAUTH_PLAINMethod · 0.95
testAUTH_LOGINMethod · 0.95
testAUTH_BUGGYMethod · 0.95
testAUTH_CRAM_MD5Method · 0.95

Calls

no outgoing calls

Tested by 9

testAUTH_PLAINMethod · 0.76
testAUTH_LOGINMethod · 0.76
testAUTH_BUGGYMethod · 0.76
testAUTH_CRAM_MD5Method · 0.76
testAUTH_multipleMethod · 0.76
test_auth_functionMethod · 0.76