Allow Configuring 'DEFAULT_EMAIL_FROM' in Django 83/52783/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 27 Feb 2018 23:00:46 +0000 (15:00 -0800)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 27 Feb 2018 23:05:54 +0000 (15:05 -0800)
This sets the default 'FROM' address in the header of outgoing emails
from the system. Making this configurable allows users to specify the
address notification emails come from.

Change-Id: Ibe229ef503847411f4879d5715392f816a455733
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
dashboard/config.env.sample
dashboard/src/pharos_dashboard/settings.py

index edd2bf0..c36e52a 100644 (file)
@@ -31,3 +31,4 @@ EMAIL_HOST=
 EMAIL_PORT=
 EMAIL_HOST_USER=
 EMAIL_HOST_PASSWORD=
+DEFAULT_FROM_EMAIL=webmaster@localhost
index 361c4a1..0ac5479 100644 (file)
@@ -196,3 +196,4 @@ EMAIL_PORT = os.environ['EMAIL_PORT']
 EMAIL_HOST_USER = os.environ['EMAIL_HOST_USER']
 EMAIL_HOST_PASSWORD = os.environ['EMAIL_HOST_PASSWORD']
 EMAIL_USE_TLS=True
+DEFAULT_EMAIL_FROM = os.environ.get('DEFAULT_EMAIL_FROM', 'webmaster@localhost')