Implements interfaces: twisted.mail.interfaces.IMessageDelivery

SimpleDelivery is a message delivery factory with no interesting behavior.

Method __init__ Undocumented
Method receivedHeader Generate the Received header for a message.
Method validateFrom Validate the address from which the message originates.
Method validateTo Validate the address for which the message is destined.
def __init__(self, messageFactory):
Undocumented
def receivedHeader(self, helo, origin, recipients):

Generate the Received header for a message.

ParametersheloThe argument to the HELO command and the client's IP address. (type: 2-tuple of bytes and bytes.)
originThe address the message is from (type: Address)
recipientsA list of the addresses for which this message is bound. (type: list of User)
ReturnsThe full "Received" header string. (type: bytes)
def validateFrom(self, helo, origin):

Validate the address from which the message originates.

ParametersheloThe argument to the HELO command and the client's IP address. (type: 2-tuple of bytes and bytes.)
originThe address the message is from (type: Address)
Returnsorigin or a Deferred whose callback will be passed origin. (type: Deferred or Address)
RaisesSMTPBadSenderRaised of messages from this address are not to be accepted.
def validateTo(self, user):

Validate the address for which the message is destined.

ParametersuserThe address to validate. (type: User)
ReturnsA Deferred which becomes, or a callable which takes no arguments and returns an object implementing IMessageSMTP. This will be called and the returned object used to deliver the message when it arrives. (type: no-argument callable)
RaisesSMTPBadRcptRaised if messages to the address are not to be accepted.
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.