From 756482724dcb791fb58832d72d0132b93fb8cec8 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Tue, 1 Dec 2020 00:12:12 +0100 Subject: [PATCH] cleanups for mail template --- screenless/bureau/mailroom/email.html | 9 ++++++--- screenless/bureau/mailroom/mailroom.py | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/screenless/bureau/mailroom/email.html b/screenless/bureau/mailroom/email.html index d8a96d2..7a2b29b 100644 --- a/screenless/bureau/mailroom/email.html +++ b/screenless/bureau/mailroom/email.html @@ -19,12 +19,13 @@ width: 70%; min-height: 12em; padding-right: 3%; - line-height: 0.9em; + line-height: 1.2em; } #menu { + font-family: "CMU Sans Serif"; width: 24%; float: left; - padding-right: 3%; + /* padding-right: 3%; */ } .cmd { clear: both; @@ -38,9 +39,11 @@
diff --git a/screenless/bureau/mailroom/mailroom.py b/screenless/bureau/mailroom/mailroom.py index 5f515e5..ba910cb 100644 --- a/screenless/bureau/mailroom/mailroom.py +++ b/screenless/bureau/mailroom/mailroom.py @@ -104,7 +104,7 @@ class MailRoom(Bureau): """ #TODO: consider replacing this whole mess with # https://pypi.python.org/pypi/mail-parser - internaldate = resp_obj[b'INTERNALDATE'] + internaldate = resp_obj[imap_id][b'INTERNALDATE'] msg_data = resp_obj[imap_id][b'RFC822'].decode('utf-8') msg_obj = email.message_from_string(msg_data, @@ -128,6 +128,9 @@ class MailRoom(Bureau): msg.content = msg.content.get_content() else: msg.content = "ERROR COULD NOT FIND EMAIL BODY!\n Big shrug." + msg.content = msg.content.replace("<", "<") + msg.content = msg.content.replace(">", ">") + msg.content = msg.content.replace("\n", "
") # extract other sub-messages / attachments #for part in msg_obj.walk():