From 12edc160df0ead9ac1ae4e62a44d49582e063021 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 13 Aug 2024 11:22:36 -0500 Subject: Emails: Make "From" address configurable We are running GeneNetwork in different environments. Each environment could have it's own separate domain, and need a different sender email to allow the underlying services to allow the emails through. --- gn_auth/auth/authorisation/users/views.py | 1 + 1 file changed, 1 insertion(+) (limited to 'gn_auth/auth') diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py index eb1870f..363da92 100644 --- a/gn_auth/auth/authorisation/users/views.py +++ b/gn_auth/auth/authorisation/users/views.py @@ -154,6 +154,7 @@ def send_verification_email( send_message(smtp_user=current_app.config["SMTP_USER"], smtp_passwd=current_app.config["SMTP_PASSWORD"], message=build_email_message( + from_address=current_app.config["EMAIL_ADDRESS"], to_addresses=(user_address(user),), subject=subject, txtmessage=__render__("emails/verify-email.txt"), -- cgit v1.2.3