How to use the aiosmtpd.streams.SmtpStreamReader function in aiosmtpd

To help you get started, we’ve selected a few aiosmtpd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aio-libs / aiosmtpd / aiosmtpd / protocol.py View on Github external
def __init__(self, handler, host=None, loop=None, fqdn=b'localhost',
                 max_size=None):
        super().__init__(streams.SmtpStreamReader(loop=loop),
                         self.client_connected, loop=loop)

        self.connection_open = asyncio.Future(loop=loop)
        self.connection_closed = asyncio.Future(loop=loop)

        self.handler = handler
        self._fqdn = fqdn
        self._max_size = max_size
        self._state = STATE_CONNECTING
        self._loop = loop

        self._read_mode = READ_MODE_COMMAND
        self._helo = None
        self._sender = None
        self._recipients = []
        self._allowed_recipients = set()