From 9eafc7bb77e89492aa727396b6654b3b81d3f124 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sat, 20 Nov 2021 21:48:17 +0100 Subject: [PATCH] v0.1.4 --- setup.cfg | 2 +- src/de/p1st/exec_notify/lib/mail.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index cdd229d..5832c8f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ [metadata] name = de.p1st.exec_notify -version = 0.1.3 +version = 0.1.4 author = Daniel Langbein author_email = daniel@systemli.org description = Send mail with process output diff --git a/src/de/p1st/exec_notify/lib/mail.py b/src/de/p1st/exec_notify/lib/mail.py index 035d1d9..45da696 100644 --- a/src/de/p1st/exec_notify/lib/mail.py +++ b/src/de/p1st/exec_notify/lib/mail.py @@ -10,10 +10,12 @@ from de.p1st.exec_notify.lib import config, util def sendMailOrWriteToFile(SUBJECT: str, BODY: str, informAboutLocalMail: bool = True): + mailDir = config.getMailDir() + if informAboutLocalMail and _localMailExists(): SUBJECT=f'{SUBJECT} | UNREAD LOCAL MAIL' BODY=f'[!] Note [!]\n' \ - f'There is local mail inside [file][maildir] that was not delivered previously! ' \ + f'There is local mail inside {mailDir} that was not delivered previously! ' \ f'Please read and then delete it to get rid of this warning.\n\n\n' \ f'{BODY}'