'Send `str\' to the server.'

def send(self, str):

    if (self.debuglevel > 0):
        raw = repr(str)
        if (self.debuglevel < 2):
            if (len(raw) > 100):
                raw = (raw[:100] + '...')
            if ('AUTH' in raw):
                raw = 'AUTH    <censored>'
        self.debug('send:', raw)
    if (hasattr(self, 'sock') and self.sock):
        try:
            self.sock.sendall(str)
        except socket.error:
            self.close()
            raise SMTPServerDisconnected('Server    not    connected')
    else:
        raise SMTPServerDisconnected('please    run    connect()    first')
