Send E-Mail only on error
Is there a configuration for only sending out the E-Mail if something is wrong?
As I am using healtchecks.io I would get notified if something is wrong with the script.
Hi, this is not possible at the moment, but I can try to add this. I'll keep you posted here.
maybe something like
# 1 to enable, any other value to disable.
MAIL_SUCCESS=0
if [ "$VERBOSITY" -eq 1 ]; then
send_mail < "$TMP_OUTPUT"
else
# or send a short mail if enabled on success
if [ "$MAIL_SUCCESS" -eq 1 ]; then
trim_log < "$TMP_OUTPUT" | send_mail
fi
fi
I will keep the email report on every run, so I won't implement this, but there are some alternatives after the latest changes I've made.
With Apprise notification service you'll get more flexibily with the notification service you want to use, plus the full report attached either in a supported service or email.