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`.`alias`.`MessageWrapper``

class documentation

`class MessageWrapper: (source)`

Constructor: `MessageWrapper(protocol, process, reactor)`

Implements interfaces: `twisted.mail.interfaces.IMessageSMTP`

View In Hierarchy

A message receiver which delivers a message to a child process.

Method | `__init__` | No summary
Method | `__str__` | Build a string representation of this `MessageWrapper` instance.
Method | `connectionLost` | Ignore notification of lost connection.
Method | `eomReceived` | Disconnect from the child process and set up a timeout to wait for it to exit.
Method | `lineReceived` | Write a received line to the child process.
Instance Variable | `completion` | The deferred which will be triggered by the protocol when the child process exits.
Instance Variable | `completionTimeout` | The number of seconds to wait for the child process to exit before reporting the delivery as a failure.
Instance Variable | `done` | A flag indicating whether the child process has exited (`True`) or not (`False`).
Instance Variable | `processName` | The process name.
Instance Variable | `protocol` | See `__init__`.
Instance Variable | `reactor` | A reactor which will be used to schedule timeouts.
Method | `_completionCancel` | Handle the expiration of the timeout for the child process to exit by terminating the child process forcefully and issuing a failure to the `completion` deferred.
Method | `_processEnded` | Record process termination and cancel the timeout call if it is active.
Instance Variable | `_timeoutCallID` | The call used to time out delivery, started when the connection to the child process is closed.

def __init__(self, protocol, process=None, reactor=None): (source)

Parameters
protocol:`ProcessAliasProtocol` | The protocol associated with the child process.
process:`bytes` or `None` | The process name.
reactor:`None` or `IReactorTime` provider | A reactor which will be used to schedule timeouts.

def __str__(self) -> `str`: (source)

Build a string representation of this `MessageWrapper` instance.

Returns
`bytes` | A string containing the name of the process.

def connectionLost(self): (source)
from `twisted.mail.interfaces.IMessageSMTP`

Ignore notification of lost connection.

def eomReceived(self): (source)
from `twisted.mail.interfaces.IMessageSMTP`

Disconnect from the child process and set up a timeout to wait for it to exit.

Returns
`Deferred` | A deferred which will be called back when the child process exits.

def lineReceived(self, line): (source)
from `twisted.mail.interfaces.IMessageSMTP`

Write a received line to the child process.

Parameters
line:`bytes` | A received line of the message.

completion: `Deferred` = (source)

The deferred which will be triggered by the protocol when the child process exits.

completionTimeout: `int` or `float` = (source)

The number of seconds to wait for the child process to exit before reporting the delivery as a failure.

done: `bool` = (source)

A flag indicating whether the child process has exited (`True`) or not (`False`).

processName: `bytes` or `None` = (source)

The process name.

protocol = (source)

See `__init__`.

reactor: `IReactorTime` provider = (source)

A reactor which will be used to schedule timeouts.

def _completionCancel(self): (source)

Handle the expiration of the timeout for the child process to exit by terminating the child process forcefully and issuing a failure to the `completion` deferred.

def _processEnded(self, result): (source)

Record process termination and cancel the timeout call if it is active.

Parameters
result:`Failure` | The reason the child process terminated.
Returns
`None` or `Failure` | None, if the process end is expected, or the reason the child process terminated, if the process end is unexpected.

_timeoutCallID: `None` or `IDelayedCall` provider = (source)

The call used to time out delivery, started when the connection to the child process is closed.