From ac00574cdaeede02105188bf415a4e5d63f91054 Mon Sep 17 00:00:00 2001 From: Max Chis Date: Thu, 28 Nov 2024 15:26:09 -0500 Subject: [PATCH] Add Josh bcc for signup link --- middleware/primary_resource_logic/signup_logic.py | 1 + middleware/third_party_interaction_logic/mailgun_logic.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/middleware/primary_resource_logic/signup_logic.py b/middleware/primary_resource_logic/signup_logic.py index df15cd8e..a160557e 100644 --- a/middleware/primary_resource_logic/signup_logic.py +++ b/middleware/primary_resource_logic/signup_logic.py @@ -37,6 +37,7 @@ def send_signup_link(email: str, token: str): subject="Please validate your account", text=text, html=text, + bcc="josh.chamberlain@pdap.io", ) diff --git a/middleware/third_party_interaction_logic/mailgun_logic.py b/middleware/third_party_interaction_logic/mailgun_logic.py index 71720a25..f2f2352d 100644 --- a/middleware/third_party_interaction_logic/mailgun_logic.py +++ b/middleware/third_party_interaction_logic/mailgun_logic.py @@ -9,7 +9,11 @@ def send_via_mailgun( - to_email: str, subject: str, text: str, html: Optional[str] = None + to_email: str, + subject: str, + text: str, + html: Optional[str] = None, + bcc: Optional[str] = None, ): """ Sends an email via Mailgun @@ -22,6 +26,8 @@ def send_via_mailgun( if html is not None: data["html"] = html + if bcc is not None: + data["bcc"] = bcc r = requests.post( MAILGUN_URL, auth=("api", get_env_variable("MAILGUN_KEY")), data=data, timeout=5