From 665ec6c475e6b838205151f811a55c1d180f1c3c Mon Sep 17 00:00:00 2001 From: Douglas Hall <douglashall@dhcp-18-189-105-26.dyn.mit.edu> Date: Wed, 10 May 2017 13:44:19 -0400 Subject: [PATCH] Allow override of initial account activation from address. In PR #15030, we missed adding the override of the initial account activation from address using the ACTIVATION_EMAIL_FROM_ADDRESS SiteConfiguration setting. We had only added the override when a subsequent activation email was sent. ENT-318 --- common/djangoapps/student/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index f15aec4547d..3a396c82cb5 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -619,10 +619,8 @@ def compose_and_send_activation_email(user, profile, user_registration=None): # Email subject *must not* contain newlines subject = ''.join(subject.splitlines()) message_for_activation = render_to_string('emails/activation_email.txt', context) - from_address = configuration_helpers.get_value( - 'email_from_address', - settings.DEFAULT_FROM_EMAIL - ) + from_address = configuration_helpers.get_value('email_from_address', settings.DEFAULT_FROM_EMAIL) + from_address = configuration_helpers.get_value('ACTIVATION_EMAIL_FROM_ADDRESS', from_address) if settings.FEATURES.get('REROUTE_ACTIVATION_EMAIL'): dest_addr = settings.FEATURES['REROUTE_ACTIVATION_EMAIL'] message_for_activation = ("Activation for %s (%s): %s\n" % (user, user.email, profile.name) + -- GitLab