Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self._read_mode = READ_MODE_COMMAND
self._helo = None
self._sender = None
self._recipients = []
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
def connection_lost(self, exc):
# TODO: Something with exc
self._state = STATE_CLOSED
self.connection_closed.set_result(None)
super(SmtpProtocol, self).connection_lost(exc)
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()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
self._recipients = []
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
self._read_mode = READ_MODE_COMMAND
self._helo = None
self._sender = None
self._recipients = []
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
self._sender = None
self._recipients = []
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
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()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
self._helo = None
self._sender = None
self._recipients = []
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)
self._loop = loop
self._read_mode = READ_MODE_COMMAND
self._helo = None
self._sender = None
self._recipients = []
self._allowed_recipients = set()
self._is_esmtp = False
self._max_size = None
self._message_size = None
self._recipients_truncated = False
self.COMMANDS = {
b'HELO': SmtpProtocol.helo,
b'EHLO': SmtpProtocol.ehlo,
b'VRFY': SmtpProtocol.vrfy,
b'EXPN': SmtpProtocol.expn,
b'RSET': SmtpProtocol.rset,
b'MAIL': SmtpProtocol.mail,
b'RCPT': SmtpProtocol.rcpt,
b'DATA': SmtpProtocol.data,
b'NOOP': SmtpProtocol.noop,
b'QUIT': SmtpProtocol.quit,
}
self.worker = asyncio.ensure_future(self.run(), loop=loop)
if self.is_open():
self.connection_open.set_result(True)