Module mail2beyond.connectors.void

Creates the built-in 'void' connector that can be used to discard SMTP messages.

Expand source code
"""Creates the built-in 'void' connector that can be used to discard SMTP messages."""
from mail2beyond import framework


class Connector(framework.BaseConnector):
    """Defines a connector that does not do anything."""
    name = "void"

    def submit(self, parser):
        """Overwrites the submit() method, but does nothing."""
        self.log.debug(f"connector '{self}' successfully sent message to the abyss")

    def pre_submit(self, parser):
        """Overwrites the pre_submit() method, but does nothing."""

Classes

class Connector (**kwargs)

Defines a connector that does not do anything.

Initialize the object with required attributes.

Notes

Any arguments passed in when this object is created will be stored in the 'config' attribute of the object.

Expand source code
class Connector(framework.BaseConnector):
    """Defines a connector that does not do anything."""
    name = "void"

    def submit(self, parser):
        """Overwrites the submit() method, but does nothing."""
        self.log.debug(f"connector '{self}' successfully sent message to the abyss")

    def pre_submit(self, parser):
        """Overwrites the pre_submit() method, but does nothing."""

Ancestors

Class variables

var name

Methods

def pre_submit(self, parser)

Overwrites the pre_submit() method, but does nothing.

Expand source code
def pre_submit(self, parser):
    """Overwrites the pre_submit() method, but does nothing."""
def submit(self, parser)

Overwrites the submit() method, but does nothing.

Expand source code
def submit(self, parser):
    """Overwrites the submit() method, but does nothing."""
    self.log.debug(f"connector '{self}' successfully sent message to the abyss")

Inherited members