class documentation

class AddressAlias(AliasBase): (source)

Constructor: AddressAlias(alias, *args)

Implements interfaces: twisted.mail.interfaces.IAlias

View In Hierarchy

An alias which translates one email address into another.

Method __init__ No summary
Method __str__ Build a string representation of this AddressAlias instance.
Method createMessageReceiver Create a message receiver which delivers a message to the destination address.
Method resolve Map this alias to its ultimate destination.
Instance Variable alias The destination address.

Inherited from AliasBase:

Method domain Return the domain associated with original address.
Instance Variable domains See __init__.
Instance Variable original The original address being aliased.
def __init__(self, alias, *args): (source)
Parameters
alias:Address, User, bytes or object which can be converted into bytesThe destination address.
*args:2-tuple of (0) dict mapping bytes to IDomain provider, (1) bytesArguments for AliasBase.__init__.
def __str__(self) -> str: (source)

Build a string representation of this AddressAlias instance.

Returns
bytesA string containing the destination address.
def createMessageReceiver(self): (source)

Create a message receiver which delivers a message to the destination address.

Returns
IMessage providerA message receiver.
def resolve(self, aliasmap, memo=None): (source)

Map this alias to its ultimate destination.

Parameters
aliasmap:dict mapping bytes to AliasBaseA mapping of username to alias or group of aliases.
memo:None or dict of AliasBaseA record of the aliases already considered in the resolution process. If provided, memo is modified to include this alias.
Returns
IMessage or NoneA message receiver for the ultimate destination or None for an invalid destination.

The destination address.