Skip to content

Commit

Permalink
Catch more errors when sending mail
Browse files Browse the repository at this point in the history
Not only SMTPException errors but any errors need to be caught and logged to enable debugging connectivity issues
  • Loading branch information
keptenkurk committed May 29, 2020
1 parent cf9a091 commit 5483efc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/BS440mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,6 @@ def execute(self, config, persondata, weightdata, bodydata):
except smtplib.SMTPException as e:
log.error('Failed to send e-mail:')
log.error(e)

except Exception as e:
log.error(str(e))
log.info('Finished plugin: ' + __name__)

0 comments on commit 5483efc

Please sign in to comment.