mailbox.NoSuchMailboxError

exception mailbox.NoSuchMailboxError Raised when a mailbox is expected but is not found, such as when instantiating a Mailbox subclass with a path that does not exist (and with the create parameter set to False), or when opening a folder that does not exist.

mailbox.MMDFMessage.set_from()

set_from(from_, time_=None) Set the “From ” line to from_, which should be specified without a leading “From ” or trailing newline. For convenience, time_ may be specified and will be formatted appropriately and appended to from_. If time_ is specified, it should be a time.struct_time instance, a tuple suitable for passing to time.strftime(), or True (to use time.gmtime()).

mailbox.MMDFMessage.set_flags()

set_flags(flags) Set the flags specified by flags and unset all others. Parameter flags should be the concatenation in any order of zero or more occurrences of each of 'R', 'O', 'D', 'F', and 'A'.

mailbox.MMDFMessage.remove_flag()

remove_flag(flag) Unset the flag(s) specified by flag without changing other flags. To remove more than one flag at a time, flag maybe a string of more than one character.

mailbox.MMDFMessage.get_from()

get_from() Return a string representing the “From ” line that marks the start of the message in an mbox mailbox. The leading “From ” and the trailing newline are excluded.

mailbox.MMDFMessage.get_flags()

get_flags() Return a string specifying the flags that are currently set. If the message complies with the conventional format, the result is the concatenation in the following order of zero or one occurrence of each of 'R', 'O', 'D', 'F', and 'A'.

mailbox.MMDFMessage.add_flag()

add_flag(flag) Set the flag(s) specified by flag without changing other flags. To add more than one flag at a time, flag may be a string of more than one character.

mailbox.MMDFMessage

class mailbox.MMDFMessage(message=None) A message with MMDF-specific behaviors. Parameter message has the same meaning as with the Message constructor. As with message in an mbox mailbox, MMDF messages are stored with the sender’s address and the delivery date in an initial line beginning with “From ”. Likewise, flags that indicate the state of the message are typically stored in Status and X-Status headers. Conventional flags for MMDF messages are identical to those of mbox message and are

mailbox.MMDF.unlock()

unlock() Three locking mechanisms are used—dot locking and, if available, the flock() and lockf() system calls.

mailbox.MMDF.lock()

lock() unlock() Three locking mechanisms are used—dot locking and, if available, the flock() and lockf() system calls.