'''
-mail_iterator.py - The module contains the MailIterator class.
+imap-mark-seen.py - Tool to mark all e-mails as seen
Copyright (c) 2012 Intra2net AG
Author: Plamen Dimitrov and Thomas Jarosch
mailid_list = data[0].split()
return mailid_list
- def update_message(self, mid, mailbox):
+ def set_message_seen(self, mid):
"""Sets the \\Seen flag for a message."""
try:
# Work around unsolicited server responses in imaplib by clearing them
self.mail_con.response('STORE')
- result, data = self.mail_con.uid('STORE', mid, '+FLAGS', "(\Seen)")
+ _result, data = self.mail_con.uid('STORE', mid, '+FLAGS', "(\Seen)")
logging.debug("New flags for message %s are %s", mid, data)
except (self.mail_con.error):
raise UserWarning("Could not set the flags for the e-mail " + mid.decode('iso-8859-1') + ".")