Skip to content

Commit

Permalink
Fix E-Mail SMTP Timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGrubba committed Nov 11, 2024
1 parent 4a5a6f1 commit 3d55e2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import threading
import queue

smtp = smtplib.SMTP_SSL(EmailConfig.smtp_host, EmailConfig.smtp_port)
email_queue = queue.Queue()


Expand Down Expand Up @@ -65,8 +64,10 @@ def send_email(template_name: str, to: str, **kwargs):

logger.debug(f"Sending email to {to} with subject: {subject}")
# Send email
smtp = smtplib.SMTP_SSL(EmailConfig.smtp_host, EmailConfig.smtp_port)
smtp.login(EmailConfig.login_usr, EmailConfig.login_pwd)
smtp.send_message(msg)
smtp.quit()

logger.info(f"Email sent to {to} with subject: {subject}")

Expand Down

0 comments on commit 3d55e2e

Please sign in to comment.