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}'