File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55"""
66import json
77
8- from flask import render_template , Response , request
8+ from flask import render_template , Response , request , current_app
99from werkzeug .exceptions import default_exceptions
1010
1111# App declared directly in __init__ as per
2525 get_all_users ,
2626 )
2727
28- from users .config import MAIL_ADMIN
29-
3028
3129@APP .route ('/' )
3230def map_view ():
@@ -163,7 +161,7 @@ def add_user_view():
163161 user = added_user )
164162 recipient = added_user .email
165163 send_async_mail (
166- sender = MAIL_ADMIN ,
164+ sender = current_app . config [ " MAIL_ADMIN" ] ,
167165 recipients = [recipient ],
168166 subject = subject ,
169167 text_body = body ,
@@ -374,7 +372,7 @@ def reminder_view():
374372 url = APP .config ["PUBLIC_URL" ],
375373 user = user )
376374 send_async_mail (
377- sender = MAIL_ADMIN ,
375+ sender = current_app . config [ " MAIL_ADMIN" ] ,
378376 recipients = [email ],
379377 subject = subject ,
380378 text_body = body , html_body = '' )
You can’t perform that action at this time.
0 commit comments