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`.`relaymanager`.`_AttemptManager``

class documentation

`class _AttemptManager: (source)`

View In Hierarchy

A manager for an attempt to relay a set of messages to a mail exchange server.

Method | `__init__` | No summary
Method | `getCompletionDeferred` | Return a deferred which will fire when the attempt to relay is finished.
Method | `notifyDone` | When the connection is lost or cannot be established, prepare to resend unsent messages and fire all deferred which are waiting for the completion of the attempt to relay.
Method | `notifyFailure` | Generate a bounce message for a message which cannot be relayed.
Method | `notifyNoConnection` | When a connection to the mail exchange server cannot be established, prepare to resend messages later.
Method | `notifySuccess` | Remove a message from the relay queue after it has been successfully sent.
Instance Variable | `manager` | See `__init__`
Instance Variable | `noisy` | Undocumented
Instance Variable | `reactor` | Undocumented
Method | `_finish` | Remove a message from the relay queue and from the smart host's list of messages being relayed.
Instance Variable | `_completionDeferreds` | Deferreds which are to be notified when the attempt to relay is finished.

def __init__(self, manager, noisy=True, reactor=None): (source)

Parameters
manager:`SmartHostSMTPRelayingManager` | A smart host.
noisy:`bool` | A flag which determines whether informational log messages will be generated (`True`) or not (`False`).
reactor:`IReactorTime` provider | A reactor which will be used to schedule delayed calls.

def getCompletionDeferred(self): (source)

Return a deferred which will fire when the attempt to relay is finished.

Returns
`Deferred` | A deferred which will fire when the attempt to relay is finished.

def notifyDone(self, relay): (source)

When the connection is lost or cannot be established, prepare to resend unsent messages and fire all deferred which are waiting for the completion of the attempt to relay.

Parameters
relay:`SMTPManagedRelayerFactory` | The factory for the relayer for the connection.

def notifyFailure(self, relay, message): (source)

Generate a bounce message for a message which cannot be relayed.

Parameters
relay:`SMTPManagedRelayerFactory` | The factory for the relayer responsible for the message.
message:`bytes` | The path of the file holding the message.

def notifyNoConnection(self, relay): (source)

When a connection to the mail exchange server cannot be established, prepare to resend messages later.

Parameters
relay:`SMTPManagedRelayerFactory` | The factory for the relayer meant to use the connection.

def notifySuccess(self, relay, message): (source)

Remove a message from the relay queue after it has been successfully sent.

Parameters
relay:`SMTPManagedRelayerFactory` | The factory for the relayer which sent the message.
message:`bytes` | The path of the file holding the message.

manager = (source)

See `__init__`

noisy = (source)

Undocumented

reactor = (source)

Undocumented

def _finish(self, relay, message): (source)

Remove a message from the relay queue and from the smart host's list of messages being relayed.

Parameters
relay:`SMTPManagedRelayerFactory` | The factory for the relayer which sent the message.
message:`bytes` | The path of the file holding the message.

_completionDeferreds: `list` of `Deferred` = (source)

Deferreds which are to be notified when the attempt to relay is finished.