From ed50ed6020a299048e6276494b830934edbccdad Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Mon, 27 Sep 2021 02:21:54 +0000 Subject: [PATCH] Add exception handling --- relaystatus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/relaystatus.py b/relaystatus.py index eddd282..69971b6 100644 --- a/relaystatus.py +++ b/relaystatus.py @@ -42,4 +42,6 @@ with open(old_file, "w") as output: try: smtp = smptlib.SMTP('localhost') - smtp.sendmail('relaystatus@encryptionin.space', ['relaystatus@lists.encryptionin.space'],) + smtp.sendmail('relaystatus@encryptionin.space', ['relaystatus@lists.encryptionin.space'], status) +except SMTPException: + print("couldn't send")