feat(settings): Add e-mail configuration

This commit is contained in:
Tom Hubrecht 2024-09-24 22:45:42 +02:00
parent 49f1133fed
commit 7064a3aa4b
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
4 changed files with 13 additions and 0 deletions

1
.credentials/EMAIL_HOST Normal file
View file

@ -0,0 +1 @@
localhost

1
.credentials/FROM_EMAIL Normal file
View file

@ -0,0 +1 @@
Délégation Générale Numérique <dgsi@localhost>

View file

@ -0,0 +1 @@
dgsi@localhost

View file

@ -94,6 +94,16 @@ TEMPLATES = [
WSGI_APPLICATION = "app.wsgi.application"
###
# E-Mail configuration
DEFAULT_FROM_EMAIL = credentials["FROM_EMAIL"]
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"]
###
# Database configuration
# -> https://docs.djangoproject.com/en/4.2/ref/settings/#databases