Commit 2b07ece7 authored by Vitalis Salis's avatar Vitalis Salis

astakos: Change email subject and correct email

parent 6e61d731
......@@ -341,7 +341,8 @@ VERIFICATION_EMAIL_SUBJECT = '%s account verification' % _SITENAME
ACCOUNT_CREATION_SUBJECT = '%s account created (%%(user)s)' % _SITENAME
HELPDESK_NOTIFICATION_EMAIL_SUBJECT = \
'%s account activated (%%(user)s)' % _SITENAME
EMAIL_CHANGE_EMAIL_SUBJECT = '%s e-mail change notification' % _SITENAME
EMAIL_CHANGE_NEW_EMAIL_SUBJECT = '%s e-mail change notification' % _SITENAME
EMAIL_CHANGE_OLD_EMAIL_SUBJECT = '%s e-mail change notification' % _SITENAME
PASSWORD_RESET_EMAIL_SUBJECT = 'Password reset on %s' % _SITENAME
PROJECT_CREATION_SUBJECT = \
'%s application for a new project created (%%s)' % _SITENAME
......
{% extends "im/email.txt" %}
{% block content %}
Dear {{ ec.user.realname }}
Dear {{ ec.user.realname }},
You recently requested to modify the e-mail that is used for your {{ BRANDING_SERVICE_NAME }} account from {{ ec.user.email }} to {{ ec.new_email_address }}.
......
......@@ -166,7 +166,7 @@ class TestUserUtils(TestCase):
send_change_email_to_old(email_change)
render_to_string_mock.assert_called_once_with(default_template, {'ec': email_change})
send_mail_mock.assert_called_once_with(
_(astakos_messages.EMAIL_CHANGE_EMAIL_SUBJECT),
_(astakos_messages.EMAIL_CHANGE_OLD_EMAIL_SUBJECT),
message,
astakos_settings.SERVER_EMAIL,
[email_change.user.email],
......
......@@ -240,7 +240,7 @@ def send_change_email_to_new(ec, email_template_name=(
'ec': ec}
message = render_to_string(email_template_name, c)
from_email = settings.SERVER_EMAIL
send_mail(_(astakos_messages.EMAIL_CHANGE_EMAIL_SUBJECT), message,
send_mail(_(astakos_messages.EMAIL_CHANGE_NEW_EMAIL_SUBJECT), message,
from_email,
[ec.new_email_address], connection=get_connection())
msg = 'Sent change email for %s'
......@@ -252,5 +252,5 @@ def send_change_email_to_old(email_change,
message = render_to_string(email_template_name, {'ec': email_change})
from_email = settings.SERVER_EMAIL
send_mail(_(astakos_messages.EMAIL_CHANGE_EMAIL_SUBJECT), message,
send_mail(_(astakos_messages.EMAIL_CHANGE_OLD_EMAIL_SUBJECT), message,
from_email, [email_change.user.email], connection=get_connection())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment