diff --git a/app/app/settings.py b/app/app/settings.py index c871ff5b..195c65e9 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -296,12 +296,12 @@ APPLICATION_INSIGHTS = { 'endpoint': env('AZURE_APPINSIGHTS_ENDPOINT', None), } -## necessary for email verification setup -# EMAIL_USE_TLS = True -# EMAIL_HOST = 'smtp.gmail.com' -# EMAIL_HOST_USER = 'random@gmail.com' -# EMAIL_HOST_PASSWORD = 'gfds6jk#4ljIr%G8%' -# EMAIL_PORT = 587 -# -## During development only -# EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' +# necessary for email verification of new accounts +EMAIL_USE_TLS = env.bool('EMAIL_USE_TLS', False) +EMAIL_HOST = env('EMAIL_HOST', None) +EMAIL_HOST_USER = env('EMAIL_HOST_USER', None) +EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None) +EMAIL_PORT = env.int('EMAIL_PORT', 587) + +if not EMAIL_HOST: + EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'