From 9e5f3ddfe27cef91a36310b2f651a3223ee64cad Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Wed, 3 May 2017 21:53:40 +0200 Subject: [PATCH] tweaks and fixes for email reading --- screenless/bureau/mailroom/mailroom.py | 1 + screenless/bureau/publications/news.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/screenless/bureau/mailroom/mailroom.py b/screenless/bureau/mailroom/mailroom.py index 0d07151..37374f7 100644 --- a/screenless/bureau/mailroom/mailroom.py +++ b/screenless/bureau/mailroom/mailroom.py @@ -259,6 +259,7 @@ class MailRoom(Bureau): Polls the currently configured IMAP server and returns a dict containing unread emails. """ + self._connect_imap() messages = self.imapserv.sort("ARRIVAL", ["UNSEEN"]) print("%d unread messages in INBOX" % len(messages)) resp = self.imapserv.fetch(messages, ['FLAGS', 'INTERNALDATE', diff --git a/screenless/bureau/publications/news.html b/screenless/bureau/publications/news.html index 66e6b90..4808b1f 100644 --- a/screenless/bureau/publications/news.html +++ b/screenless/bureau/publications/news.html @@ -5,7 +5,7 @@