twisted.mail.alias.FileWrapper class documentationtwisted.mail.alias
View Source
(View In Hierarchy)
Implements interfaces: twisted.mail.smtp.IMessage
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. |
| Parameters | filename | The name of the file in which the message should be stored. (type: bytes) |
Write a received line to the temporary file.
| Parameters | line | A received line of the message. (type: bytes) |
Build a string representation of this FileWrapper
instance.
| Returns | A string containing the file name of the message. (type: bytes) | |