diff --git a/matemat/webserver/pagelets/receipt_smtp_cron.py b/matemat/webserver/pagelets/receipt_smtp_cron.py index 6095d7b..b9ceafe 100644 --- a/matemat/webserver/pagelets/receipt_smtp_cron.py +++ b/matemat/webserver/pagelets/receipt_smtp_cron.py @@ -72,7 +72,7 @@ def _send_receipt_mails(receipts: List[Receipt], # Attempt to upgrade to a TLS connection try: con.starttls() - except: + except BaseException: # If STARTTLS failed, only continue if explicitly requested by configuration if config['SmtpEnforceTLS'] != '0': logger.error('STARTTLS not supported by SMTP server, aborting!')