|
|
|
@ -54,11 +54,10 @@ class MailRoom(Bureau):
|
|
|
|
|
self.trashfolder = self.config["user"]["trashfolder"]
|
|
|
|
|
self.imap_ssl = self.config["user"]["ssl"]
|
|
|
|
|
|
|
|
|
|
self.imapserv = imapclient.IMAPClient(self.host, use_uid=True, ssl=self.imap_ssl)
|
|
|
|
|
self.imapserv.login(self.login, self.password)
|
|
|
|
|
self.imapserv.select_folder("INBOX")
|
|
|
|
|
self.last_login = time.time()
|
|
|
|
|
self.last_login = 0
|
|
|
|
|
self._connect_imap()
|
|
|
|
|
else:
|
|
|
|
|
#TODO: do this with small print
|
|
|
|
|
print("you need to configure an IMAP account!")
|
|
|
|
|
print("add a user: section to PO.yml with:")
|
|
|
|
|
print(" login: mylogin")
|
|
|
|
@ -77,7 +76,6 @@ class MailRoom(Bureau):
|
|
|
|
|
connect / reconnect to imap server
|
|
|
|
|
"""
|
|
|
|
|
def run_login():
|
|
|
|
|
self.imapserv.logout()
|
|
|
|
|
self.imapserv = imapclient.IMAPClient(self.host, use_uid=True, ssl=self.imap_ssl)
|
|
|
|
|
self.imapserv.login(self.login, self.password)
|
|
|
|
|
self.imapserv.select_folder("INBOX")
|
|
|
|
|