Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send E-Mail only on error #116

Open
Klar opened this issue Jul 25, 2024 · 2 comments
Open

Send E-Mail only on error #116

Klar opened this issue Jul 25, 2024 · 2 comments
Labels
enhancement New feature or request to do

Comments

@Klar
Copy link

Klar commented Jul 25, 2024

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.

@auanasgheps auanasgheps added enhancement New feature or request to do labels Jul 31, 2024
@auanasgheps
Copy link
Owner

Hi, this is not possible at the moment, but I can try to add this. I'll keep you posted here.

@Klar
Copy link
Author

Klar commented Dec 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request to do
Projects
None yet
Development

No branches or pull requests

2 participants