Commit 665ec6c4 by Douglas Hall

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
parent 9bedb066
......@@ -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) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment