From 0f86b05ce511efd2fa0770aec8ba62b245d7b4d7 Mon Sep 17 00:00:00 2001 From: loberer Date: Fri, 15 Dec 2023 13:26:33 +0100 Subject: [PATCH] FIX email_smtp.py: smtp_timeout was undefined in scope of send_mail --- front/plugins/_publisher_email/email_smtp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/plugins/_publisher_email/email_smtp.py b/front/plugins/_publisher_email/email_smtp.py index b74ecfe8..57803dba 100755 --- a/front/plugins/_publisher_email/email_smtp.py +++ b/front/plugins/_publisher_email/email_smtp.py @@ -109,12 +109,12 @@ def send(pHTML, pText): if get_setting_value("LOG_LEVEL") == 'debug': - send_email(msg) + send_email(msg,smtp_timeout) else: try: - send_email(msg) + send_email(msg,smtp_timeout) except smtplib.SMTPAuthenticationError as e: mylog('none', [' ERROR: Couldn\'t connect to the SMTP server (SMTPAuthenticationError)']) @@ -132,7 +132,7 @@ def send(pHTML, pText): mylog('none', [' ERROR: ', str(e)]) # ---------------------------------------------------------------------------------- -def send_email(msg): +def send_email(msg,smtp_timeout): # Send mail if get_setting_value('SMTP_FORCE_SSL'): mylog('debug', ['SMTP_FORCE_SSL == True so using .SMTP_SSL()'])