changing hardcoded mail from to config var

This commit is contained in:
Martynas Sklizmantas 2024-02-25 09:59:13 +01:00
parent 8cb120bd9b
commit adc55035da

View file

@ -97,7 +97,7 @@ def create_app(config_class=Config):
secure = ()
mail_handler = SMTPHandler(
mailhost=(app.config['MAIL_SERVER'], app.config['MAIL_PORT']),
fromaddr='errors@rimu.geek.nz',
fromaddr=(app.config['MAIL_FROM']),
toaddrs=app.config['ADMINS'], subject='PieFed error',
credentials=auth, secure=secure)
mail_handler.setLevel(logging.ERROR)