Add __main__ to email for testing.

This commit is contained in:
Sage Vaillancourt 2022-09-26 08:40:10 -04:00
parent 9df78a9d6f
commit c262762bdc
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ api_secret = os.environ['MAILJET_SECRET_KEY']
mailjet = Client(auth=(api_key, api_secret), version='v3.1') mailjet = Client(auth=(api_key, api_secret), version='v3.1')
def send_password_reset(to_email: str, reset_link: str): def send_password_reset(to_email: str, reset_link: str):
data = { data = {
'Messages': [ 'Messages': [
@ -32,3 +33,6 @@ def send_password_reset(to_email: str, reset_link: str):
print(result.status_code) print(result.status_code)
print(result.json()) print(result.json())
if __name__ == "__main__":
send_password_reset('sage@sagev.space', 'https://sagev.space/')