feat(settings): Add more email configuration
This commit is contained in:
parent
7ae43d4d7e
commit
c6aa72e843
|
@ -96,13 +96,12 @@ WSGI_APPLICATION = "app.wsgi.application"
|
||||||
# E-Mail configuration
|
# E-Mail configuration
|
||||||
|
|
||||||
DEFAULT_FROM_EMAIL = credentials["FROM_EMAIL"]
|
DEFAULT_FROM_EMAIL = credentials["FROM_EMAIL"]
|
||||||
EMAIL_HOST = credentials["EMAIL_HOST"]
|
EMAIL_HOST = credentials.get("EMAIL_HOST", "localhost")
|
||||||
|
EMAIL_HOST_PASSWORD = credentials.get("EMAIL_HOST_PASSWORD", "")
|
||||||
|
EMAIL_HOST_USER = credentials.get("EMAIL_HOST_USER", "")
|
||||||
|
EMAIL_USE_SSL = credentials.get("EMAIL_USE_SSL", False)
|
||||||
SERVER_EMAIL = credentials["SERVER_EMAIL"]
|
SERVER_EMAIL = credentials["SERVER_EMAIL"]
|
||||||
|
|
||||||
if DEBUG:
|
|
||||||
# Otherwise, use the default smtp backend
|
|
||||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
|
@ -193,6 +192,9 @@ BACKGROUND_TASK_ASYNC_THREADS = 4
|
||||||
|
|
||||||
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
# Print the e-mails in the console
|
||||||
|
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||||
|
|
||||||
INSTALLED_APPS += [
|
INSTALLED_APPS += [
|
||||||
"debug_toolbar",
|
"debug_toolbar",
|
||||||
"django_browser_reload",
|
"django_browser_reload",
|
||||||
|
|
Loading…
Reference in a new issue