mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Add subject line to the invitation email.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user