Let the send_email task set the from address

This commit is contained in:
Rebecca Law
2016-06-13 14:56:21 +01:00
parent c9f1eb65a7
commit 5fc14940f3
4 changed files with 6 additions and 27 deletions

View File

@@ -167,13 +167,10 @@ def send_user_email_verification(user_id):
'url': _create_verification_url(user_to_send_to, secret_code)
}
}
email_from = '"GOV.UK Notify" <{}>'.format(
current_app.config['VERIFY_CODE_FROM_EMAIL_ADDRESS']
)
send_email.apply_async((
current_app.config['NOTIFY_SERVICE_ID'],
str(uuid.uuid4()),
email_from,
'',
encryption.encrypt(message),
datetime.utcnow().strftime(DATETIME_FORMAT)
), queue='email-registration-verification')