Implements interfaces: twisted.mail.interfaces.IMessageSMTP

A message receiver which delivers a message to a file.

Instance Variable fp A file used for temporary storage of the message. (type: file-like object)
Instance Variable finalname The name of the file in which the message should be stored. (type: bytes)
Method __init__
Method lineReceived Write a received line to the temporary file.
Method eomReceived Handle end of message by writing the message to the file.
Method connectionLost Close the temporary file when the connection is lost.
Method __str__ Build a string representation of this FileWrapper instance.
fp =
A file used for temporary storage of the message. (type: file-like object)
finalname =
The name of the file in which the message should be stored. (type: bytes)
def __init__(self, filename): (source)
ParametersfilenameThe name of the file in which the message should be stored. (type: bytes)
def lineReceived(self, line): (source)

Write a received line to the temporary file.

ParameterslineA received line of the message. (type: bytes)
def eomReceived(self): (source)

Handle end of message by writing the message to the file.

ReturnsA deferred which succeeds with the name of the file to which the message has been stored or fails if the message cannot be saved to the file. (type: Deferred which successfully results in bytes)
def connectionLost(self): (source)

Close the temporary file when the connection is lost.

def __str__(self): (source)

Build a string representation of this FileWrapper instance.

ReturnsA string containing the file name of the message. (type: bytes)
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.