(self)
Close the connection to the SMTP server.
Close the connection to the SMTP server.
Close the connection to the SMTP server .
def close(self):
        """Close the connection to the SMTP server."""
        try:
            file = self.file
            self.file = None
            if file:
                file.close()
        finally:
            sock = self.sock
            self.sock = None
            if sock:
                sock.close()
def close ( self ) : try : file = self . file self . file = None if file : file . close ( ) finally : sock = self . sock self . sock = None if sock : sock . close ( )