From 943839a34b5c3085b2dee46e4e4f900d287cd247 Mon Sep 17 00:00:00 2001 From: jgyates Date: Fri, 29 Mar 2024 18:23:29 -0400 Subject: [PATCH] V1.19.02 --- genmonlib/mymail.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/genmonlib/mymail.py b/genmonlib/mymail.py index ac414419..33f08f9d 100644 --- a/genmonlib/mymail.py +++ b/genmonlib/mymail.py @@ -269,8 +269,12 @@ def TestSendSettings( ) except Exception as e1: # self.LogErrorLine("Error SMTP sendmail: " + str(e1)) - session.quit() - return "Error sending email: " + str(e1) + errorstring = str(e1) + try: + session.quit() + except: + pass + return "Error sending email: " + str(errorstring) session.quit() return "Success" @@ -668,7 +672,10 @@ def sendEmailDirectMIME( ) except Exception as e1: self.LogErrorLine("Error SMTP sendmail: " + str(e1)) - session.quit() + try: + session.quit() + except: + pass return False session.quit()