'Close the connection to the SMTP server.'

def close(self):

    if self.file:
        self.file.close()
    self.file = None
    if self.sock:
        self.sock.close()
    self.sock = None
    return
