# ``twisted`.`mail`.`maildir`.`MaildirMessage``

class documentation

`class MaildirMessage(mail.FileMessage): (source)`

View In Hierarchy

A message receiver which adds a header and delivers a message to a file whose name includes the size of the message.

Method | `__init__` |
Method | `eomReceived` | At the end of message, rename the file holding the message to its final name concatenated with the size of the file.
Method | `lineReceived` | Write a line to the file.
Instance Variable | `finalName` | Undocumented
Instance Variable | `size` | The number of octets in the message.

Inherited from `FileMessage`:

Method | `connectionLost` | Delete the file holding the partially received message.
Instance Variable | `fp` | See `__init__`.
Instance Variable | `name` | See `__init__`.

def __init__(self, address, fp, *a, **kw): (source)
overrides `twisted.mail.mail.FileMessage.__init__`

Parameters
address:`bytes` | The address of the message recipient.
fp:file-like object | The file in which to store the message while it is being received.
*a:2-`tuple` of (0) `bytes`, (1) `bytes` | Positional arguments for `FileMessage.__init__`.
**kw:`dict` | Keyword arguments for `FileMessage.__init__`.

def eomReceived(self): (source)
from `twisted.mail.interfaces.IMessageSMTP`
overrides `twisted.mail.mail.FileMessage.eomReceived`
At the end of message, rename the file holding the message to its final name concatenated with the size of the file.

Returns
`Deferred` which successfully results in `bytes` | A deferred which returns the name of the file holding the message.

def lineReceived(self, line): (source)
from `twisted.mail.interfaces.IMessageSMTP`
overrides `twisted.mail.mail.FileMessage.lineReceived`
Write a line to the file.

Parameters
line:`bytes` | A received line.

finalName = (source)
overrides `twisted.mail.mail.FileMessage.finalName`

Undocumented

size: `int` = (source)
The number of octets in the message.