Other functions

You can add a message to a mailbox by calling the method append(mailbox, flags, datetime, message). Here, mailbox is the name of the mailbox, flags is an optional list of message flags, datetime is a timestamp for the message, and message is the message text, including headers.

IMAP uses an INTERNALDATE representation for dates and times. Use the module function Internaldate2tuple(date) to translate an INTERNALDATE to a TimeTuple, and the function Time2Internaldate(tuple) to go from TimeTuple to INTERNALDATE.

The function ParseFlags(str) splits an IMAP4 FLAGS response into a tuple of flags.

0 0

Post a comment