From 76a6260b1823fcd1ab24f632024b6a99a753fd54 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 28 Jul 2020 18:59:34 +0200 Subject: [PATCH] SMTP user and password are None by default, add From Email tag --- note_kfet/settings/production.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/note_kfet/settings/production.py b/note_kfet/settings/production.py index b7b8856e..c22bca60 100644 --- a/note_kfet/settings/production.py +++ b/note_kfet/settings/production.py @@ -37,10 +37,11 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_USE_SSL = False EMAIL_HOST = os.getenv('EMAIL_HOST', 'smtp.example.org') EMAIL_PORT = os.getenv('EMAIL_PORT', 465) -EMAIL_HOST_USER = os.getenv('EMAIL_USER', 'change_me') -EMAIL_HOST_PASSWORD = os.getenv('EMAIL_PASSWORD', 'change_me') +EMAIL_HOST_USER = os.getenv('EMAIL_USER', None) +EMAIL_HOST_PASSWORD = os.getenv('EMAIL_PASSWORD', None) SERVER_EMAIL = os.getenv("NOTE_MAIL", "notekfet@example.com") +DEFAULT_FROM_EMAIL = "NoteKfet2020 <" + SERVER_EMAIL + ">" # Security settings SECURE_CONTENT_TYPE_NOSNIFF = False