Merge pull request #518 from LouisOb/main

FIX unable to send mail with publisher mail plugin - thanks to @LouisOb 🙏
This commit is contained in:
jokob-sk
2023-12-15 20:48:05 +00:00
committed by GitHub

View File

@@ -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()'])