From c262762bdc0106b02930c3c55ee71aa51f82d938 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Mon, 26 Sep 2022 08:40:10 -0400 Subject: [PATCH] Add __main__ to email for testing. --- undercover/email.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/undercover/email.py b/undercover/email.py index 70f426f..0c4e328 100644 --- a/undercover/email.py +++ b/undercover/email.py @@ -6,6 +6,7 @@ api_secret = os.environ['MAILJET_SECRET_KEY'] mailjet = Client(auth=(api_key, api_secret), version='v3.1') + def send_password_reset(to_email: str, reset_link: str): data = { 'Messages': [ @@ -32,3 +33,6 @@ def send_password_reset(to_email: str, reset_link: str): print(result.status_code) print(result.json()) + +if __name__ == "__main__": + send_password_reset('sage@sagev.space', 'https://sagev.space/')