This commit is contained in:
Daniel Langbein 2021-11-20 21:48:17 +01:00
parent a00a1f029d
commit 9eafc7bb77
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
[metadata] [metadata]
name = de.p1st.exec_notify name = de.p1st.exec_notify
version = 0.1.3 version = 0.1.4
author = Daniel Langbein author = Daniel Langbein
author_email = daniel@systemli.org author_email = daniel@systemli.org
description = Send mail with process output description = Send mail with process output

View File

@ -10,10 +10,12 @@ from de.p1st.exec_notify.lib import config, util
def sendMailOrWriteToFile(SUBJECT: str, BODY: str, informAboutLocalMail: bool = True): def sendMailOrWriteToFile(SUBJECT: str, BODY: str, informAboutLocalMail: bool = True):
mailDir = config.getMailDir()
if informAboutLocalMail and _localMailExists(): if informAboutLocalMail and _localMailExists():
SUBJECT=f'{SUBJECT} | UNREAD LOCAL MAIL' SUBJECT=f'{SUBJECT} | UNREAD LOCAL MAIL'
BODY=f'[!] Note [!]\n' \ 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'Please read and then delete it to get rid of this warning.\n\n\n' \
f'{BODY}' f'{BODY}'