Skip to content

feat(alerting): Make email alert provider e-mail customizable and templateable #1129

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

imrelaszlo
Copy link
Contributor

@imrelaszlo imrelaszlo commented Jun 3, 2025

Please see this pull request: #1119

In addition to what is described there, it is possible to send HTML (multipart) emails. To do this, an environment variable must be set for the template folder (GATUS_EMAIL_TEMPLATE_DIR), and for each notification you can configure which template file to use. If there is no template, then use the custom texts, if there is none, then it works according to the original operation (everything is backwards compatible). If template found, plain text body is auto generated (HTML tags stripped out).

        provider-override:
          text-email-subject-triggered: "Alert triggered"
          text-email-subject-resolved: "Alert resolved"
          file-email-body-triggered: "email-template-alert-triggered.html"
          file-email-body-resolved: "email-template-alert-resolved.html"

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@github-actions github-actions bot added feature New feature or request area/alerting Related to alerting labels Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Related to alerting feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant