File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class Config(object):
4444 MAIL_USE_TLS = os .environ .get ('MAIL_USE_TLS' ) is not None
4545 MAIL_USE_SSL = os .environ .get ('MAIL_USE_SSL' ) is not None
4646 MAIL_USERNAME = os .environ .get ('MAIL_USERNAME' )
47+ MAIL_USER = os .environ .get ('MAIL_USER' )
4748 MAIL_PASSWORD = os .environ .get ('MAIL_PASSWORD' )
4849 # print("MAIL PASSWORD", MAIL_PASSWORD)
4950 INSTANCE = os .environ .get ('INSTANCE' ) or "PRODUCTION"
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ services:
8080 - INSTANCE=(DEV)
8181828283+ - MAIL_USER=${MAIL_USER}
8384 # - MAIL_PORT=465 # comment if using the dev server
8485 # - MAIL_USE_TLS=1 # comment if using the dev server
8586 labels :
Original file line number Diff line number Diff line change 5151if not app .debug :
5252 if app .config ['MAIL_SERVER' ]:
5353 auth = None
54- if app .config ['MAIL_USERNAME' ] or app .config ['MAIL_PASSWORD' ]:
54+ # Commented as authentication method changed
55+ # if app.config['MAIL_USERNAME'] or app.config['MAIL_PASSWORD']:
56+ # auth = (app.config['MAIL_USERNAME'], app.config['MAIL_PASSWORD'])
57+ if app .config ['MAIL_USER' ] and app .config ['MAIL_PASSWORD' ]:
58+ auth = (app .config ['MAIL_USER' ], app .config ['MAIL_PASSWORD' ])
59+ elif app .config ['MAIL_USERNAME' ] and app .config ['MAIL_PASSWORD' ]:
5560 auth = (app .config ['MAIL_USERNAME' ], app .config ['MAIL_PASSWORD' ])
5661 secure = None
5762 if app .config ['MAIL_USE_TLS' ]:
You can’t perform that action at this time.
0 commit comments