Close the connection to the SMTP server.
(self)
| 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.""" |
no outgoing calls