Change reply to address for invitation emails to be invitation sender

If someone receives an invitation email for Notify the reply-to address
of the email was the GOV.UK Notify email address. This has been changed
to be the email address of the user who sent the invite.

Pivotal story: https://www.pivotaltracker.com/story/show/153094646
This commit is contained in:
Katie Smith
2017-12-18 11:39:21 +00:00
parent 3015d4fc07
commit 1b82afb6bb
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ def create_invited_user(service_id):
notification_type=EMAIL_TYPE, notification_type=EMAIL_TYPE,
api_key_id=None, api_key_id=None,
key_type=KEY_TYPE_NORMAL, key_type=KEY_TYPE_NORMAL,
reply_to_text=service.get_default_reply_to_email_address() reply_to_text=invited_user.from_user.email_address
) )
send_notification_to_queue(saved_notification, False, queue=QueueNames.NOTIFY) send_notification_to_queue(saved_notification, False, queue=QueueNames.NOTIFY)

View File

@@ -33,7 +33,7 @@ def test_create_invited_user(admin_request, sample_service, mocker, invitation_e
assert json_resp['data']['id'] assert json_resp['data']['id']
notification = Notification.query.first() notification = Notification.query.first()
assert notification.reply_to_text == "notify@gov.uk" assert notification.reply_to_text == invite_from.email_address
mocked.assert_called_once_with([(str(notification.id))], queue="notify-internal-tasks") mocked.assert_called_once_with([(str(notification.id))], queue="notify-internal-tasks")