aboutsummaryrefslogtreecommitdiff
path: root/src/web/notifications.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-18 22:01:17 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-18 22:01:17 +0100
commit5f53d8c5416a3f4ce6f7d12eb480192f2d80980a (patch)
tree7f2aa62cc663a26687e1c626dcb2aa419232bcaf /src/web/notifications.py
parentRephrasing... (diff)
downloadnewspipe-5f53d8c5416a3f4ce6f7d12eb480192f2d80980a.tar.gz
newspipe-5f53d8c5416a3f4ce6f7d12eb480192f2d80980a.tar.bz2
newspipe-5f53d8c5416a3f4ce6f7d12eb480192f2d80980a.zip
Added a template for the password recovery notifications.
Diffstat (limited to 'src/web/notifications.py')
-rw-r--r--src/web/notifications.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/web/notifications.py b/src/web/notifications.py
index 4f276123..f10cff73 100644
--- a/src/web/notifications.py
+++ b/src/web/notifications.py
@@ -56,22 +56,12 @@ def new_account_notification(user):
emails.send(to=user.email, bcc=conf.NOTIFICATION_EMAIL,
subject="[JARR] Account creation", plaintext=plaintext)
-def new_account_activation(user):
- """
- Account activation notification.
- """
- plaintext = """Hello,\n\nYour account has been activated. You can now connect to the platform:\n%s\n\nSee you,""" % \
- (conf.PLATFORM_URL)
- emails.send(to=user.email, bcc=conf.NOTIFICATION_EMAIL,
- subject="[JARR] Account activated", plaintext=plaintext)
-
def new_password_notification(user, password):
"""
New password notification.
"""
- plaintext = """Hello,\n\nA new password has been generated at your request:\n\n%s""" % \
- (password, )
- plaintext += "\n\nIt is advised to replace it as soon as connected to jarr.\n\nSee you,"
+ plaintext = render_template('emails/new_password.txt',
+ user=user, password=password)
emails.send(to=user.email,
bcc=conf.NOTIFICATION_EMAIL,
subject="[JARR] New password", plaintext=plaintext)
bgstack15