From 6e51cd03052b4e968825d625ce8feb05c020a8ac Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Thu, 1 Dec 2022 18:03:54 -0500 Subject: [PATCH] Unknown --- app/lib_general.py | 5 ++++- app/methods/user_methods.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/lib_general.py b/app/lib_general.py index 7c2d0f9..0061503 100644 --- a/app/lib_general.py +++ b/app/lib_general.py @@ -403,8 +403,11 @@ def send_email( log.info('SMTP configuration, connect, and send') try: - with smtplib.SMTP_SSL(settings.SMTP['server_name'], settings.SMTP['server_port'], context=context) as server: + with smtplib.SMTP_SSL(settings.SMTP['server'], settings.SMTP['port'], context=context) as server: + log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL + log.debug('SMTP log in...') server.login(settings.SMTP['username'], settings.SMTP['password']) + log.debug('SMTP send message...') server.send_message(message) log.info('Email sent') return True diff --git a/app/methods/user_methods.py b/app/methods/user_methods.py index f702b00..87f6cc7 100644 --- a/app/methods/user_methods.py +++ b/app/methods/user_methods.py @@ -704,6 +704,7 @@ def email_user_auth_key_url(

Thank you!

""" + log.info('Trying send_email()...') if send_email(from_email=from_email, from_name=from_name, to_email=to_email, to_name=to_name, bcc_email=bcc_email, bcc_name=bcc_name, subject=subject, body_text=None, body_html=body_html): log.info(f'An email with a one time use sign in link was sent to {to_email}.') return True