Switch back to read-write mode while checking for new mail on IMAP

accounts

If in read only mode, all emails will stay with 'RECENT' flag between checks.

darcs-hash:20080307150347-86b55-db2339c066d4ed47b406eaa6df146c24cc7f6514.gz
This commit is contained in:
David Rousselie
2008-03-07 16:03:47 +01:00
parent 089ccbd808
commit 6804ffd890

View File

@@ -436,7 +436,7 @@ class IMAPAccount(MailAccount):
Get a list of new emails indexes Get a list of new emails indexes
""" """
self.__logger.debug("Getting mail list") self.__logger.debug("Getting mail list")
typ, data = self.connection.select(self._get_real_mailbox(), True) typ, data = self.connection.select(self._get_real_mailbox())
typ, data = self.connection.search(None, 'RECENT') typ, data = self.connection.search(None, 'RECENT')
if typ == 'OK': if typ == 'OK':
return data[0].split(' ') return data[0].split(' ')