From f6b1b127d650d549175050cf4b9c45f460985790 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Mon, 2 Oct 2017 10:34:38 +0200 Subject: [PATCH] moved subject for user notification email to events class --- ordr2/events.py | 4 +++- ordr2/templates/emails/password_reset.jinja2 | 25 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 ordr2/templates/emails/password_reset.jinja2 diff --git a/ordr2/events.py b/ordr2/events.py index 2d85584..1f7635f 100644 --- a/ordr2/events.py +++ b/ordr2/events.py @@ -19,10 +19,12 @@ class UserNotification(object): class AccountActivation(UserNotification): + subject='[ordr] Your account was activated', template = 'ordr2:templates/emails/activation.jinja2' class PasswordReset(UserNotification): + subject='[ordr] Password Reset', template = 'ordr2:templates/emails/password_reset.jinja2' @@ -48,7 +50,7 @@ def notify_user(event): event.request ) message = Message( - subject='[ordr] Your account was activated', + subject=event.subject sender=event.request.registry.settings['mail.default_sender'], recipients=[event.user.email], html=body diff --git a/ordr2/templates/emails/password_reset.jinja2 b/ordr2/templates/emails/password_reset.jinja2 new file mode 100755 index 0000000..5fd5fca --- /dev/null +++ b/ordr2/templates/emails/password_reset.jinja2 @@ -0,0 +1,25 @@ + + + + + ordr Password Reset + + + + +

Hi there!

+

+ If you forgot your password, you can set a new one by + clicking this link. +

+

+ Regards, +
+ ordr +

+

+ Please don't respont to this email! This is an automatically generated notification by the system. + +

+ +