Commit 77d2cbf0 authored by Julian Rother's avatar Julian Rother
Browse files

Added config option MAIL_ADDRESS_OVERWRITE to simplify notification debugging

parent a7608db6
......@@ -33,6 +33,7 @@ FSMPI_IP_RANGES = ['137.226.35.192/29', '137.226.75.0/27', '137.226.127.32/27',
DISABLE_SCHEDULER = False
#MAIL_SERVER = 'mail.fsmpi.rwth-aachen.de'
MAIL_FROM = 'Video AG-Website <videoag-it@lists.fsmpi.rwth-aachen.de>'
#MAIL_ADDRESS_OVERWRITE = 'videoag-it@lists.fsmpi.rwth-aachen.de'
MAIL_SUFFIX = 'fsmpi.rwth-aachen.de'
MAIL_DEFAULT = 'Video AG <videoag@fsmpi.rwth-aachen.de>'
MAIL_ADMINS = 'videoag-it@lists.fsmpi.rwth-aachen.de'
......@@ -17,7 +17,10 @@ def send_message(msgtype, recipients, **kwargs):
if 'MAIL_SERVER' not in config:
return
s = smtplib.SMTP(config['MAIL_SERVER'])
s.send_message(msg)
if config.get('MAIL_ADDRESS_OVERWRITE'):
s.send_message(msg, to_addrs=[config['MAIL_ADDRESS_OVERWRITE']])
else:
s.send_message(msg)
s.quit()
except:
traceback.print_exc()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment