diff --git a/hc/lib/emails.py b/hc/lib/emails.py index 73b3e78c..086478a6 100644 --- a/hc/lib/emails.py +++ b/hc/lib/emails.py @@ -1,26 +1,28 @@ +from django.conf import settings from djmail.template_mail import InlineCSSTemplateMail -def login(to, ctx): - o = InlineCSSTemplateMail("login") +def send(name, to, ctx): + o = InlineCSSTemplateMail(name) + ctx["SITE_ROOT"] = settings.SITE_ROOT o.send(to, ctx) +def login(to, ctx): + send("login", to, ctx) + + def set_password(to, ctx): - o = InlineCSSTemplateMail("set-password") - o.send(to, ctx) + send("set-password", to, ctx) def alert(to, ctx): - o = InlineCSSTemplateMail("alert") - o.send(to, ctx) + send("alert", to, ctx) def verify_email(to, ctx): - o = InlineCSSTemplateMail("verify-email") - o.send(to, ctx) + send("verify-email", to, ctx) def report(to, ctx): - o = InlineCSSTemplateMail("report") - o.send(to, ctx) + send("report", to, ctx) diff --git a/templates/emails/base.html b/templates/emails/base.html index 7ed8998c..768e0191 100644 --- a/templates/emails/base.html +++ b/templates/emails/base.html @@ -79,7 +79,10 @@ text-align: center; } .email-footer p { - color: #AEAEAE; + color: #74787E; + } + .email-footer a { + color: #74787E; } .body-action { width: 100%; @@ -181,7 +184,7 @@ - Healthchecks + @@ -202,7 +205,9 @@ diff --git a/templates/emails/report-body-html.html b/templates/emails/report-body-html.html index 8f84b45a..67bfe17d 100644 --- a/templates/emails/report-body-html.html +++ b/templates/emails/report-body-html.html @@ -1,13 +1,23 @@ +{% extends "emails/base.html" %} + {% load humanize hc_extras %} +{% block content %} -

Hello,

+

Hello,

This is a monthly report sent by healthchecks.io.

- +
@@ -76,7 +90,7 @@ {% endif %} {% endfor %} @@ -87,12 +101,11 @@ Do you have more cron jobs, not yet on this list, that would benefit from monitoring? Get the ball rolling by adding one more!

-

- --
- Regards,
- healthchecks.io -

+

Cheers,
The Healthchecks.io Team

+ +{% endblock %} -

- Unsubscribe from future monthly reports -

+{% block unsub %} +
+Unsubscribe from future monthly reports +{% endblock %} \ No newline at end of file
Name - View Log + View Log