Skip to content
Snippets Groups Projects
Commit 77d2cbf0 authored by Julian Rother's avatar Julian Rother
Browse files

Added config option MAIL_ADDRESS_OVERWRITE to simplify notification debugging

parent a7608db6
No related branches found
No related tags found
No related merge requests found
......@@ -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,6 +17,9 @@ def send_message(msgtype, recipients, **kwargs):
if 'MAIL_SERVER' not in config:
return
s = smtplib.SMTP(config['MAIL_SERVER'])
if config.get('MAIL_ADDRESS_OVERWRITE'):
s.send_message(msg, to_addrs=[config['MAIL_ADDRESS_OVERWRITE']])
else:
s.send_message(msg)
s.quit()
except:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment