Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr While NameLoad body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num handlers ExceptHandler type NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Str orelse Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareLt NameLoad Num body Return NameLoad TryExcept body Expr Call NameLoad NameLoad Num Call NameLoad handlers ExceptHandler type NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad keyword Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Str attr TupleLoad Str Call AttributeLoad NameLoad attr NameLoad Str If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIn Str AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad Call NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Str attr TupleLoad Str Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore ListLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareNotIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list decorator_list
N/A N/A An SMTP client library that supports PIPELINING commands. __future__ absolute_import gevent Timeout gevent.socket wait_read pysasl SASLAuth io IO auth AuthSession extensions Extensions reply Reply datasender DataSender N/A __all__ N/A Client LmtpClient Client N/A object N/A N/A Class whose methods perform various SMTP commands on a given socket. The
    return value from each command is a |Reply| object. Commands that are
    pipelined may not have their replies filled until subsequent commands are
    executed.

    The ``extensions`` attribute contains the |Extensions| object that are made
    available by the server.

    :param socket: Connected socket to use for the client.
    :param tls_wrapper: Optional function that takes a socket and the ``tls``
                        dictionary, creates a new encrypted socket, performs
                        the TLS handshake, and returns it. The default uses
                        :class:`~gevent.ssl.SSLSocket`.
    :param address: Remote address associated with the socket, which will
                    default to a call to :py:func:`~socket.socket.getpeername`.

     __init__ N/A N/A self socket tls_wrapper address N/A None None N/A N/A N/A self io N/A IO socket tls_wrapper address N/A N/A self reply_queue N/A N/A N/A self last_error None N/A N/A self extensions N/A Extensions N/A _flush_pipeline N/A N/A self N/A N/A N/A N/A N/A N/A self io flush_send N/A True N/A N/A N/A N/A reply N/A N/A N/A self reply_queue pop 0 N/A N/A N/A IndexError N/A N/A None N/A N/A N/A reply recv N/A self io N/A N/A N/A reply is_error N/A N/A N/A self last_error reply N/A _encode N/A N/A self thing N/A N/A N/A N/A SMTPUTF8 N/A self extensions N/A N/A N/A N/A thing encode utf-8 N/A N/A N/A N/A thing encode ascii N/A has_reply_waiting N/A N/A self N/A N/A N/A Checks if the underlying socket has data waiting to be received,
        which means a reply is waiting to be read.

        :rtype: True or False

         N/A sock_fd N/A N/A N/A N/A self io socket fileno N/A N/A sock_fd 0 N/A N/A False N/A N/A N/A N/A wait_read sock_fd 0.01 N/A Timeout N/A N/A N/A Timeout N/A N/A False N/A N/A True N/A get_reply N/A N/A self command N/A [TIMEOUT] N/A N/A Gets a reply from the server that was not triggered by the client
        sending a command. This is most useful for receiving timeout
        notifications.

        :param command: Optional command name to associate with the reply.
        :returns: |Reply| object populated with the response.

         N/A reply N/A Reply command command N/A N/A N/A N/A self reply_queue append reply N/A N/A N/A self _flush_pipeline N/A reply N/A get_banner N/A N/A self N/A N/A N/A Waits for the SMTP banner at the beginning of the connection.

        :returns: |Reply| object populated with the response.

         N/A banner N/A Reply command [BANNER] N/A N/A banner enhanced_status_code False N/A N/A N/A N/A self reply_queue append banner N/A N/A N/A self _flush_pipeline N/A banner N/A custom_command N/A N/A self command arg N/A None N/A N/A Sends a custom command to the SMTP server and waits for the reply.

        :param command: The command to send.
        :param arg: Optonal argument string to send with the command.
        :returns: |Reply| object populated with the response.

         N/A custom N/A Reply command N/A N/A command upper N/A N/A N/A N/A self reply_queue append custom N/A arg N/A N/A command N/A N/A join N/A command arg N/A N/A N/A N/A self io send_command command N/A N/A N/A self _flush_pipeline N/A custom N/A ehlo N/A N/A self ehlo_as N/A N/A N/A Sends the EHLO command with identifier string and waits for the
        reply. When this method returns, the ``self.extensions`` object will
        also be populated with the SMTP extensions the server supports.

        :param ehlo_as: EHLO identifier string, usually an FQDN.
        :returns: |Reply| object populated with the response.

         N/A ehlo N/A Reply command EHLO N/A N/A ehlo enhanced_status_code False N/A N/A N/A N/A self reply_queue append ehlo N/A N/A N/A isinstance ehlo_as bytes N/A N/A ehlo_as N/A N/A ehlo_as encode ascii N/A command N/A EHLO  ehlo_as N/A N/A N/A N/A self io send_command command N/A N/A N/A self _flush_pipeline N/A N/A N/A ehlo code 250 N/A N/A N/A N/A N/A self extensions reset N/A N/A ehlo message N/A N/A N/A self extensions parse_string N/A ehlo message N/A ehlo N/A helo N/A N/A self helo_as N/A N/A N/A Sends the HELO command with identifier string and waits for the
        reply.

        :param helo_as: HELO identifier string, usually an FQDN.
        :returns: |Reply| object populated with the response.

         N/A helo N/A Reply command HELO N/A N/A helo enhanced_status_code False N/A N/A N/A N/A self reply_queue append helo N/A N/A N/A isinstance helo_as bytes N/A N/A helo_as N/A N/A helo_as encode ascii N/A command N/A HELO  helo_as N/A N/A N/A N/A self io send_command command N/A N/A N/A self _flush_pipeline N/A helo N/A encrypt N/A N/A self tls N/A N/A N/A Encrypts the underlying socket with the information given by
        ``tls``.  This call should only be used directly against servers that
        expect to be immediately encrypted. If encryption is negotiated with
        :meth:`starttls()` there is no need to call this method.

        :param tls: Dictionary of keyword arguments for
                    :class:`~gevent.ssl.SSLSocket`.

         N/A N/A N/A N/A self io encrypt_socket tls N/A starttls N/A N/A self tls N/A N/A N/A Sends the STARTTLS command with identifier string and waits for the
        reply. When the reply is received and the code is 220, the socket is
        encrypted with the parameters in ``tls``. This should be followed by a
        another call to :meth:`ehlo()`.

        :param tls: Dictionary of keyword arguments for
                    :class:`~gevent.ssl.SSLSocket`.
        :returns: |Reply| object populated with the response.

         N/A reply N/A N/A self custom_command STARTTLS N/A N/A N/A reply code 220 N/A N/A N/A N/A self encrypt tls N/A reply N/A auth N/A N/A self authcid secret authzid mechanism N/A None PLAIN N/A N/A Negotiates authentication for the current SMTP session. This
        transaction may involve several back-and-forth packets to the server,
        depending on the SASL mechanism used, and this function will only
        return once all have completed.

        :param authcid: The authentication identity, usually the username.
        :param secret: The secret (i.e. password) string to send for the given
                       authentication and authorization identities.
        :param authzid: The authorization identity, if applicable.
        :param mechanism: SASL mechanism name to use for authentication.
        :type mechanism: str
        :returns: |Reply| object populated with the response.

         N/A N/A N/A self _flush_pipeline N/A auth N/A AuthSession N/A SASLAuth N/A self io N/A N/A N/A auth client_attempt authcid secret authzid mechanism N/A mailfrom N/A N/A self address data_size N/A None N/A N/A Sends the MAIL command with the ``address`` and possibly the message
        size. The message size is sent if the server supports the SIZE
        extension. If the server does *not* support PIPELINING, the returned
        reply object is populated immediately.

        :param address: The sender address to send.
        :param data_size: Optional size of the message body.
        :returns: |Reply| object that will be populated with the response
                  once a non-pipelined command is called, or if the server does
                  not support PIPELINING.

         N/A mailfrom N/A Reply command MAIL N/A N/A N/A N/A self reply_queue append mailfrom N/A command N/A N/A join N/A MAIL FROM:< N/A N/A self _encode address > N/A N/A N/A data_size None N/A SIZE N/A self extensions N/A N/A command N/A  SIZE= N/A N/A N/A str data_size encode N/A N/A N/A N/A self io send_command command N/A N/A PIPELINING N/A self extensions N/A N/A N/A N/A self _flush_pipeline N/A mailfrom N/A rcptto N/A N/A self address N/A N/A N/A Sends the RCPT command with the ``address``. If the server
        does *not* support PIPELINING, the returned reply object is
        populated immediately.

        :param address: The sender address to send.
        :param data_size: Optional size of the message body.
        :returns: |Reply| object that will be populated with the response
                  once a non-pipelined command is called, or if the server does
                  not support PIPELINING.

         N/A rcptto N/A Reply command RCPT N/A N/A N/A N/A self reply_queue append rcptto N/A command N/A N/A join N/A RCPT TO:< N/A N/A self _encode address > N/A N/A N/A N/A self io send_command command N/A N/A PIPELINING N/A self extensions N/A N/A N/A N/A self _flush_pipeline N/A rcptto N/A data N/A N/A self N/A N/A N/A Sends the DATA command and waits for the response. If the response
        from the server is a 354, the server is respecting message data and
        should be sent :meth:`send_data` or :meth:`send_empty_data`.

        :returns: |Reply| object populated with the response.

         N/A N/A N/A self custom_command DATA N/A send_data N/A N/A self N/A data N/A N/A Processes and sends message data. At the end of the message data,
        the client will send a line with a single ``.`` to indicate the end of
        the message.  If the server does *not* support PIPELINING, the returned
        reply object is populated immediately.

        :param data: The message data parts.
        :type data: :py:obj:`bytes`
        :returns: |Reply| object that will be populated with the response
                  once a non-pipelined command is called, or if the server does
                  not support PIPELINING.

         N/A send_data N/A Reply command [SEND_DATA] N/A N/A N/A N/A self reply_queue append send_data N/A data_sender N/A DataSender data N/A N/A N/A data_sender send N/A self io N/A N/A PIPELINING N/A self extensions N/A N/A N/A N/A self _flush_pipeline N/A send_data N/A send_empty_data N/A N/A self N/A N/A N/A Sends a line with a single ``.`` to indicate an empty message. If
        the server does *not* support PIPELINING, the returned reply object is
        populated immediately.

        :returns: |Reply| object that will be populated with the response
                  once a non-pipelined command is called, or if the server does
                  not support PIPELINING.

         N/A send_data N/A Reply command [SEND_DATA] N/A N/A N/A N/A self reply_queue append send_data N/A N/A N/A N/A self io send_command . N/A N/A PIPELINING N/A self extensions N/A N/A N/A N/A self _flush_pipeline N/A send_data N/A rset N/A N/A self N/A N/A N/A Sends a RSET command and waits for the response. The intent of the
        RSET command is to reset any :meth:`mail` or :meth:`rcpt` commands that
        are pending.

        :returns: |Reply| object populated with the response.

         N/A N/A N/A self custom_command RSET N/A quit N/A N/A self N/A N/A N/A Sends the QUIT command and waits for the response. After the
        response is received (should be 221) the socket should be closed.

        :returns: |Reply| object populated with the response.

         N/A N/A N/A self custom_command QUIT N/A N/A LmtpClient N/A Client N/A N/A This sub-class has been modified to implement the LMTP protocol instead.
    The first primary difference is the :meth:`.ehlo` and :meth:`.helo` are no
    longer allowed and have been replaced with :meth:`.lhlo`. The second
    primary difference is that the :meth:`.send_data` and
    :meth:`.send_empty_data` methods now return a list of tuples containing the
    address from a successful :meth:`.rcptto` and a |Reply| object. This list
    is in the same order as the calls to :meth:`.rcptto`.

     __init__ N/A N/A self socket tls_wrapper address N/A None None N/A N/A N/A N/A N/A super LmtpClient self __init__ socket tls_wrapper address N/A N/A self rcpttos N/A N/A ehlo N/A N/A self ehlo_as N/A N/A N/A N/A NotImplementedError N/A helo N/A N/A self helo_as N/A N/A N/A N/A NotImplementedError N/A lhlo N/A N/A self lhlo_as N/A N/A N/A Sends the LHLO command with identifier string and waits for the
        reply. When this method returns, the ``self.extensions`` object will
        also be populated with the SMTP extensions the server supports.

        :param lhlo_as: LHLO identifier string, usually an FQDN.
        :returns: |Reply| object populated with the response.

         N/A lhlo N/A Reply command LHLO N/A N/A lhlo enhanced_status_code False N/A N/A N/A N/A self reply_queue append lhlo N/A N/A N/A isinstance lhlo_as bytes N/A N/A lhlo_as N/A N/A lhlo_as encode ascii N/A command N/A LHLO  lhlo_as N/A N/A N/A N/A self io send_command command N/A N/A N/A self _flush_pipeline N/A N/A N/A lhlo code 250 N/A N/A N/A self rcpttos N/A N/A N/A N/A N/A self extensions reset N/A N/A lhlo message N/A N/A N/A self extensions parse_string N/A lhlo message N/A lhlo N/A rcptto N/A N/A self address N/A N/A N/A reply N/A N/A N/A super LmtpClient self rcptto address N/A N/A N/A N/A self rcpttos append N/A address reply N/A reply N/A send_data N/A N/A self N/A data N/A N/A ret N/A N/A N/A address rcptto_reply N/A self rcpttos N/A N/A N/A N/A N/A rcptto_reply code startswith 2 N/A N/A data_reply N/A Reply command [SEND_DATA] N/A N/A N/A N/A self reply_queue append data_reply N/A N/A N/A ret append N/A address data_reply N/A N/A self rcpttos N/A N/A data_sender N/A DataSender data N/A N/A N/A data_sender send N/A self io N/A N/A PIPELINING N/A self extensions N/A N/A N/A N/A self _flush_pipeline N/A ret N/A send_empty_data N/A N/A self N/A N/A N/A ret N/A N/A N/A address rcptto_reply N/A self rcpttos N/A N/A N/A N/A N/A rcptto_reply code startswith 2 N/A N/A data_reply N/A Reply command [SEND_DATA] N/A N/A N/A N/A self reply_queue append data_reply N/A N/A N/A ret append N/A address data_reply N/A N/A self rcpttos N/A N/A N/A N/A N/A self io send_command . N/A N/A PIPELINING N/A self extensions N/A N/A N/A N/A self _flush_pipeline N/A ret N/A rset N/A N/A self N/A N/A N/A reply N/A N/A N/A super LmtpClient self rset N/A N/A self rcpttos N/A N/A reply N/A N/A