Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`mail`.`protocols`.`DomainDeliveryBase``

class documentation

`class DomainDeliveryBase: (source)`

Known subclasses: `twisted.mail.protocols.ESMTPDomainDelivery`, `twisted.mail.protocols.SMTPDomainDelivery`

Implements interfaces: `twisted.mail.interfaces.IMessageDelivery`

View In Hierarchy

A base class for message delivery using the domains of a mail service.

Method | `__init__` | No summary
Method | `receivedHeader` | Generate a received header string for a message.
Method | `validateFrom` | Validate the address from which a message originates.
Method | `validateTo` | Validate the address for which a message is destined.
Instance Variable | `host` | See `__init__`
Instance Variable | `protocolName` | The protocol being used to deliver the mail. Sub-classes should set this appropriately.
Instance Variable | `service` | See `__init__`
Instance Variable | `user` | See `__init__`

def __init__(self, service, user, host=smtp.DNSNAME): (source)

Parameters
service:`MailService` | A mail service.
user:`bytes` or `None` | The authenticated SMTP user.
host:`bytes` | The hostname.

def receivedHeader(self, helo, origin, recipients): (source)
from `twisted.mail.interfaces.IMessageDelivery`

Generate a received header string for a message.

Parameters
helo:2-`tuple` of (`bytes`, `bytes`) | The client's identity as sent in the HELO command and its IP address.
origin:`Address` | The origination address of the message.
recipients:`list` of `User` | The destination addresses for the message.
Returns
`bytes` | A received header string.

def validateFrom(self, helo, origin): (source)
from `twisted.mail.interfaces.IMessageDelivery`

Validate the address from which a message originates.

Parameters
helo:2-`tuple` of (`bytes`, `bytes`) | The client's identity as sent in the HELO command and its IP address.
origin:`Address` | The origination address of the message.
Returns
`Address` | The origination address.
Raises
`SMTPBadSender` | When messages cannot be accepted from the origination address.

def validateTo(self, user): (source)
from `twisted.mail.interfaces.IMessageDelivery`

Validate the address for which a message is destined.

Parameters
user:`User` | The destination address.
Returns
`Deferred` which successfully fires with no-argument callable which returns `IMessage` provider. | A deferred which successfully fires with a no-argument callable which returns a message receiver for the destination.
Raises
`SMTPBadRcpt` | When messages cannot be accepted for the destination address.

host = (source)

See `__init__`

protocolName: `bytes` = (source)
overridden in `twisted.mail.protocols.ESMTPDomainDelivery`, `twisted.mail.protocols.SMTPDomainDelivery`

The protocol being used to deliver the mail. Sub-classes should set this appropriately.

service = (source)

See `__init__`

user = (source)

See `__init__`