Add subject line to the invitation email.

This commit is contained in:
Rebecca Law
2016-02-29 16:12:12 +00:00
parent 3879350c12
commit 9f6255ac94
3 changed files with 6 additions and 7 deletions

View File

@@ -163,7 +163,7 @@ def invitation_template(user_name, service_name, url, expiry_date):
from string import Template
t = Template(
'$user_name has invited you to collaborate on $service_name on GOV.UK Notify.\n\n'
'GOV.UK Notify makes it easy to keep people updated, by helping you send text messages, emails and letters.\n\n'
'GOV.UK Notify makes it easy to keep people updated by helping you send text messages, emails and letters.\n\n'
'Click this link to create an account on GOV.UK Notify:\n$url\n\n'
'This invitation will stop working at midnight tomorrow. This is to keep $service_name secure.')
return t.substitute(user_name=user_name, service_name=service_name, url=url, expiry_date=expiry_date)
@@ -191,12 +191,10 @@ def email_invited_user(encrypted_invitation):
try:
email_from = "{}@{}".format(current_app.config['INVITATION_EMAIL_FROM'],
current_app.config['NOTIFY_EMAIL_DOMAIN'])
current_app.logger.info('email_from: {} invitation_content: {} to: {}'.format(email_from,
invitation_content,
invitation['to']))
subject_line = invitation_subject_line(invitation['user_name'], invitation['service_name'])
aws_ses_client.send_email(email_from,
invitation['to'],
'Invitation to GOV.UK Notify',
subject_line,
invitation_content)
except AwsSesClientException as e:
current_app.logger.error(e)