# ``twisted`.`mail`.`alias`.`AddressAlias``

class documentation

`class AddressAlias(AliasBase): (source)`

Implements interfaces: `twisted.mail.interfaces.IAlias`

View In Hierarchy

An alias which translates one email address into another.

Method | `__init__` |
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)
overrides `twisted.mail.alias.AliasBase.__init__`

Parameters
alias:`Address`, `User`, `bytes` or object which can be converted into `bytes` | The destination address.
*args:2-`tuple` of (0) `dict` mapping `bytes` to `IDomain` provider, (1) `bytes` | Arguments for `AliasBase.__init__`.

def __str__(self): (source)
Build a string representation of this `AddressAlias` instance.

Returns
`bytes` | A string containing the destination address.

def createMessageReceiver(self): (source)
from `twisted.mail.interfaces.IAlias`
Create a message receiver which delivers a message to the destination address.

Returns
`IMessage` provider | A message receiver.

def resolve(self, aliasmap, memo=None): (source)
overrides `twisted.mail.alias.AliasBase.resolve`
Map this alias to its ultimate destination.

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

alias: `Address` = (source)
The destination address.