Skip to content

Commit

Permalink
Merge pull request #361 from DNO-inc/improve_auth_logs
Browse files Browse the repository at this point in the history
change baseclass of BurritoEmail (SMTP_SSL to SMTP)
  • Loading branch information
m-o-d-e-r authored Jun 7, 2024
2 parents 9745884 + 74a85bb commit 15b9e30
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions burrito/utils/email_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from burrito.models.user_model import Users


class BurritoEmail(smtplib.SMTP_SSL):
class BurritoEmail(smtplib.SMTP):
def __init__(self, host: str):
"""
Initialize the connection to SMTP server.
Expand Down Expand Up @@ -74,9 +74,8 @@ def send_email(receivers: list[int], subject: str, content: str) -> None:
get_logger().info("Creating SMTP client...")

with get_burrito_email() as smtp_client:
get_logger().info("Connecting to SMTP server...")
smtp_client.connect(get_config().BURRITO_SMTP_SERVER)
smtp_client.noop()
get_logger().info("Turning on TLS...")
smtp_client.starttls()

get_logger().info("Trying to login...")
smtp_client.login(
Expand Down

0 comments on commit 15b9e30

Please sign in to comment.