From ff9e895e63a96e4531e0e33da0d2f53738e568c4 Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Tue, 2 Jan 2018 20:27:06 +0100 Subject: [PATCH] Fixed check if MAIL_SERVER is set --- mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail.py b/mail.py index 262db54..413390e 100644 --- a/mail.py +++ b/mail.py @@ -14,7 +14,7 @@ def send_message(msgtype, recipients, **kwargs): try: msg['Subject'] = render_template('mails/'+msgtype+'.subject', **kwargs) msg.set_content(render_template('mails/'+msgtype+'.body', **kwargs)) - if 'MAIL_SERVER' not in config: + if not config.get('MAIL_SERVER'): return s = smtplib.SMTP(config['MAIL_SERVER']) if config.get('MAIL_ADDRESS_OVERWRITE'): -- GitLab