From 4dde1b0513267a6cdada590e1a7746e963865298 Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 18 Aug 2024 10:04:57 -0700 Subject: [PATCH] Support send-as and reply-to This PR adds support for send-as and reply-to, in case we need to send from custom emails. --- src/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 7ae2880..a515574 100644 --- a/src/main.py +++ b/src/main.py @@ -93,9 +93,9 @@ def sign_up(req: SignUpRequest, request: Request): dedent( f""" Subject: Confirm Your Email Subscription for '{req.mailing_list}' - From: {os.environ["SMTP_USERNAME"]} + From: {os.getenv("SMTP_SEND_AS", os.environ["SMTP_USERNAME"])} To: {req.email} - Reply-To: {os.environ["SMTP_USERNAME"]} + Reply-To: {os.getenv("SMTP_REPLY_TO", os.environ["SMTP_USERNAME"])} MIME-Version: 1.0 Content-Type: text/html; charset="utf-8"