0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-14 08:58:29 +00:00
Commit graph

36 commits

Author SHA1 Message Date
Pēteris Caune
c69c1f5ec4
Add management command for sending "scheduled for deletion" warnings 2023-07-04 12:50:50 +03:00
Pēteris Caune
db9fd529e2
Make hc.lib.emails raise exceptions when EMAIL_ settings are not set 2023-06-13 13:27:58 +03:00
Pēteris Caune
e02a87ef48
Fix Message-ID generation when From address contains angle brackets 2023-05-26 16:51:52 +03:00
Pēteris Caune
dc44f67b83
Update hc.lib.emails to use DEFAULT_FROM_EMAIL for generating Message-ID 2023-05-26 14:32:09 +03:00
Pēteris Caune
8926fd5ac6
Add experimental support for setting custom MAIL FROM address
If settings.EMAIL_MAIL_FROM_TMPL is set, it will be used
as the MAIL FROM (envelope sender) address.

The EMAIL_MAIL_FROM_TMPL value should contain a "%s" placeholder.

This is intended for routing email bounce notifications to a specific
MX server. For example, if the site runs on example.com
but we want to receive bounce notifications at the mail server running
on bounces.example.com, we can set

    EMAIL_MAIL_FROM_TMPL = "%s@bounces.example.com"

Experimental, may change!
2023-05-23 15:38:39 +03:00
Pēteris Caune
eab52ed73c
Add email fallback for Signal notifications that hit rate limit 2023-04-04 10:21:35 +03:00
Pēteris Caune
161430fb10
Sort imports and add "from __future__ import annotations" 2022-10-17 16:52:15 +03:00
Pēteris Caune
1b0d0eac6a
Enable retry for SMTPDataError 2021-09-23 15:20:42 +03:00
Pēteris Caune
642d436ae9
Add absolute_site_logo_url template tag
This commit adds a {% absolute_site_logo_url %} template tag.
The tag emits an absolute url pointing to either
SITE_LOGO_URL or to the fallback picture.

The tag is used in base email template, in slack message
template, and in "Add MS Teams" page.

This commit also fixes a couple instances where absolute URLs
were constructed like so:

    {% site_root %}/docs/

This would result in incorrect links if Healthchecks is not
running at webserver's root. The correct way is:

    {% site_root %}{% url 'hc-docs' %}

Finally, this commit removes stuff/logo.svg and
stuff/logo-full.svg. Selfhosted sites should not use the
official Healthchecks.io logos, so no point keeping them around
there.
2021-08-13 14:57:15 +03:00
Pēteris Caune
484c0befbc
Fix email template to use SITE_LOGO_URL (with img/logo.png fallback)
Fixes: 
2021-08-13 14:21:20 +03:00
Pēteris Caune
f3af13654e
Refactor email sending functions to allow customization
For example, if we need to use a custom From: address,
we can now do:

    m = make_message("template-name", recipient, ctx)
    m.from_email = "...."  # customize here
    send(m)
2021-08-05 14:13:25 +03:00
Pēteris Caune
fca600659d
Improve hc.lib.emails.send()
- add optional `from_email` argument
- add test cases that exercise the retry loop
2021-08-03 19:02:25 +03:00
Pēteris Caune
fb79948759
Update the "Change Email" function to use confirmation codes 2020-11-16 15:33:29 +02:00
Pēteris Caune
ed6b15bfa9
Update the "Set Password" function to use confirmation codes 2020-11-16 14:53:50 +02:00
Pēteris Caune
e3aedd3b03
Add require_sudo_mode decorator
Planning to use it for sensitive operations (add/remove security keys),
change email, change password, close account.

The decorator sends a six-digit confirmation code to user's email
and renders a form for entering it back. If the user enters the
correct code, the decorators sets a sudo=active marker in
user's session, valid for 30 minutes.
2020-11-13 11:08:06 +02:00
Pēteris Caune
d5502c50ca
Add retries to the the email sending logic
When sending email using Django's default email
backend (SMTP), and if there is a network issue, the backend
can throw SMTPServerDisconnected.

This commit adds a retry logic which retries sending the
email two times when SMTPServerDisconnected is thrown.
2020-10-30 14:18:38 +02:00
Pēteris Caune
d05691f86f
SMS and phone calls now have separate "limit reached" email templates. 2020-08-03 18:00:48 +03:00
Pēteris Caune
6ede17d93f
Cleanup and comments. 2020-04-20 11:23:07 +03:00
Pēteris Caune
57da17b8e2
Send an "Ownership Transfer Request" email notification. 2020-04-13 15:04:59 +03:00
Pēteris Caune
66a6de70c0
Send email notification when monthly SMS sending limit is reached. Fixes 2019-10-18 17:15:02 +03:00
Pēteris Caune
cdfc9840a7
Source formatted with Black 2019-05-15 14:27:50 +03:00
Pēteris Caune
945a66ab0a
Management command for sending inactive account notifications 2019-03-13 00:38:34 +02:00
Pēteris Caune
b9a81ad382
Add "List-Unsubscribe" header to alert and report emails 2018-10-23 11:26:13 +03:00
Pēteris Caune
39bc12e351 Invoices to email. 2018-01-09 16:45:38 +02:00
Pēteris Caune
2393dad09e Users can update their email addresses. Fixes 2017-08-23 15:47:20 +03:00
Pēteris Caune
0d24d650f2 "X-Bounce-Url" header in email messages. An API endpoint to handle bounce notifications. () 2017-03-05 21:42:36 +02:00
Pēteris Caune
f767cf59aa ctx can contain database query objects, evaluate them before passing off to a thread 2017-02-28 15:21:44 +02:00
Pēteris Caune
b63f19f415 Simplify: remove djmail and django-ses-backend dependencies. 2017-01-29 11:44:22 +02:00
Pēteris Caune
8d956b3365 email template from Litmus. CSS already inlined, so dropping premailer dependency. 2017-01-15 13:10:08 +02:00
Pēteris Caune
2df92c9c9e Nicer html report 2016-06-25 05:27:28 +03:00
Pēteris Caune
1dacc8b797 Users can add passwords to their accounts. Fixes 2016-01-05 00:25:08 +02:00
Pēteris Caune
91e6f80d9a Code to send monthly reports (but no management command yet to actually send them) 2015-12-15 02:27:24 +02:00
Pēteris Caune
f0089e2cd2 Send emails using djmail, can verify email addresses in /channels/ 2015-08-14 10:56:07 +03:00
Pēteris Caune
c54cb6469d Send emails using djrill (Mandrill) 2015-07-11 11:45:38 +03:00
Pēteris Caune
8628be8584 email_from setting, don't send alerts about checks without associated user 2015-07-08 09:40:58 +03:00
Pēteris Caune
aad4bd2ffb Background worker to send notifications 2015-06-16 11:33:12 +03:00