Entry
How can I get a message's flag (Unread, Seen, Reply...) using Imaplib?
Aug 24th, 2000 20:08
unknown unknown, Donn Cave
Assuming srv is an instance of IMAP4, and you want both flags and
headers for messages 1 through 5 in the currently selected folder -
status, result = srv.fetch('1:5', '(FLAGS RFC822.HEADER)')
Now you have in "result" a sequence of strings, with all the
information you requested. It's not broken up in the most convenient
way for you -- you will need to use some string functions to extract
the flags and everything.