Get first signup email through

This commit is contained in:
Aarni Halinen
2020-07-16 13:27:18 +03:00
parent f9e7c4a904
commit 39ab86fe3e
3 changed files with 21 additions and 30 deletions
+2 -3
View File
@@ -42,13 +42,12 @@ def send_email(to, subject, body, fail_silently=False):
}
success = mailjet.send.create(data=data)
if success.status_code != 201:
# For some reason returns 200 OK instead of 201 Created...
if success.status_code != 200:
raise Exception(f'Failed to send email: {success.json()}')
except Exception as ex:
logging.exception('Failed to send email.')
logging.debug(EMAIL_API_KEY)
logging.debug(EMAIL_API_SECRET)
def send_signup_email(to, subject, id, uuid):