mailbox.MaildirMessage.get_subdir()

get_subdir() Return either “new” (if the message should be stored in the new subdirectory) or “cur” (if the message should be stored in the cur subdirectory). Note A message is typically moved from new to cur after its mailbox has been accessed, whether or not the message is has been read. A message msg has been read if "S" in msg.get_flags() is True.

mailbox.MaildirMessage.get_info()

get_info() Return a string containing the “info” for a message. This is useful for accessing and modifying “info” that is experimental (i.e., not a list of flags).

mailbox.MaildirMessage.get_flags()

get_flags() Return a string specifying the flags that are currently set. If the message complies with the standard Maildir format, the result is the concatenation in alphabetical order of zero or one occurrence of each of 'D', 'F', 'P', 'R', 'S', and 'T'. The empty string is returned if no flags are set or if “info” contains experimental semantics.

mailbox.MaildirMessage.get_date()

get_date() Return the delivery date of the message as a floating-point number representing seconds since the epoch.

mailbox.MaildirMessage.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. The current “info” is overwritten whether or not it contains experimental information rather than flags.

mailbox.MaildirMessage

class mailbox.MaildirMessage(message=None) A message with Maildir-specific behaviors. Parameter message has the same meaning as with the Message constructor. Typically, a mail user agent application moves all of the messages in the new subdirectory to the cur subdirectory after the first time the user opens and closes the mailbox, recording that the messages are old whether or not they’ve actually been read. Each message in cur has an “info” section added to its file name to store informatio

mailbox.Maildir.__setitem__()

__setitem__(key, message) update(arg) Warning These methods generate unique file names based upon the current process ID. When using multiple threads, undetected name clashes may occur and cause corruption of the mailbox unless threads are coordinated to avoid using these methods to manipulate the same mailbox simultaneously.

mailbox.Maildir.update()

update(arg) Warning These methods generate unique file names based upon the current process ID. When using multiple threads, undetected name clashes may occur and cause corruption of the mailbox unless threads are coordinated to avoid using these methods to manipulate the same mailbox simultaneously.

mailbox.Maildir.unlock()

unlock() Maildir mailboxes do not support (or require) locking, so these methods do nothing.

mailbox.Maildir.remove_folder()

remove_folder(folder) Delete the folder whose name is folder. If the folder contains any messages, a NotEmptyError exception will be raised and the folder will not be deleted.