twisted.mail.maildirView Source (View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IConsumer
A task which adds a message to a maildir mailbox.
|Instance Variable||defer||A deferred which fires when the task has completed. (type:
|Instance Variable||opencall||A scheduled call to
|Instance Variable||msg||The message to add. (type: file-like object)|
|Instance Variable||tmpname||The pathname of the temporary file holding the message while it is being
|Instance Variable||fh||The new maildir file. (type: file)|
|Instance Variable||filesender||A file sender which sends the message. (type:
|Instance Variable||myproducer||The registered producer. (type:
|Instance Variable||streaming||Indicates whether the registered producer provides a streaming interface. (type:
|Method||startUp||Start transferring the message to the mailbox.|
|Method||registerProducer||Register a producer and start asking it for data if it is non-streaming.|
|Method||prodProducer||Repeatedly prod a non-streaming producer to produce data.|
|Method||unregisterProducer||Finish transferring the message to the mailbox.|
|Method||write||Write data to the maildir file.|
|Method||fail||Fire the deferred to indicate the task completed with a failure.|
|Method||moveFileToNew||Place the message in the new/ directory, add it to the mailbox and fire the deferred to indicate that the task has completed successfully.|
|Method||createTempFile||Create a temporary file to hold the message as it is being transferred.|
Start transferring the message to the mailbox.
Repeatedly prod a non-streaming producer to produce data.
Finish transferring the message to the mailbox.
Fire the deferred to indicate the task completed with a failure.
|Parameters||err||The error that occurred. (type: |
Place the message in the new/ directory, add it to the mailbox and fire the deferred to indicate that the task has completed successfully.
Create a temporary file to hold the message as it is being transferred.