From 27e6da88506e1f9702f379bfc0f38dab9601cc74 Mon Sep 17 00:00:00 2001 From: Ravi Tripathi <ravi89@uab.edu> Date: Tue, 4 Apr 2023 15:13:16 -0500 Subject: [PATCH] Use a new variable to send the notification email to users for their account --- prod_rmq_agents/notify_user.py | 2 +- rabbit_config.py.example | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/prod_rmq_agents/notify_user.py b/prod_rmq_agents/notify_user.py index d204bad..1c9c83b 100644 --- a/prod_rmq_agents/notify_user.py +++ b/prod_rmq_agents/notify_user.py @@ -70,7 +70,7 @@ def notify_user(ch, method, properties, body): else: errmsg = "Sending email to user" smtp = smtplib.SMTP(rcfg.Mail_server) - smtp.sendmail(rcfg.Sender, receivers, message) + smtp.sendmail(rcfg.Sender_notification, receivers, message) logger.debug(f"Email sent to: {user_email}") diff --git a/rabbit_config.py.example b/rabbit_config.py.example index 4a959b2..d1f3a92 100644 --- a/rabbit_config.py.example +++ b/rabbit_config.py.example @@ -25,6 +25,7 @@ db_path = ".agent_db" Mail_server = 'localhost' Admin_email = 'root@localhost' Sender = 'ROOT@LOCALHOST' +Sender_notification = 'NOTIFY@LOCALHOST' Sender_subscription = 'SUBSCRIBE_EMAIL@LOCALHOST' Sender_alias = 'Services' Subject = 'New User Account' -- GitLab