class documentation

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:SmartHostSMTPRelayingManagerA smart host.
noisy:boolA flag which determines whether informational log messages will be generated (True) or not (False).
reactor:IReactorTime providerA 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
DeferredA 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:SMTPManagedRelayerFactoryThe 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:SMTPManagedRelayerFactoryThe factory for the relayer responsible for the message.
message:bytesThe 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:SMTPManagedRelayerFactoryThe 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:SMTPManagedRelayerFactoryThe factory for the relayer which sent the message.
message:bytesThe path of the file holding the message.

Undocumented

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:SMTPManagedRelayerFactoryThe factory for the relayer which sent the message.
message:bytesThe 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.