How to use the aiosmtpd.smtp.MISSING 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 cole / aiosmtplib / tests / testserver / smptd_server.py View on Github external
async def smtp_EXPN(self, arg):
        """
        Pass EXPN to handler hook.
        """
        status = await self._call_handler_hook("EXPN")
        await self.push("502 EXPN not implemented" if status is MISSING else status)
github cole / aiosmtplib / tests / smtpd.py View on Github external
async def smtp_HELP(self, arg):
        """
        Override help to pass to handler hook.
        """
        status = await self._call_handler_hook("HELP")
        if status is MISSING:
            await super().smtp_HELP(arg)
        else:
            await self.push(status)
github johnnykv / heralding / heralding / capabilities / smtp.py View on Github external
async def smtp_QUIT(self, arg):
    if arg:
      await self.push('501 Syntax: QUIT')
    else:
      status = await self._call_handler_hook('QUIT')
      await self.push('221 Bye' if status is MISSING else status)
      self.stop()