From ee3f3c79602a17d6b33439b2d548466a0de2b038 Mon Sep 17 00:00:00 2001 From: eeintech Date: Wed, 21 Apr 2021 09:28:30 -0400 Subject: [PATCH] Updated default backend setting and enabled default sender setting --- InvenTree/InvenTree/settings.py | 9 +++++++-- InvenTree/config_template.yaml | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 4e9ed35748..596dbd29c8 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -512,8 +512,8 @@ EXCHANGE_BACKEND = 'InvenTree.exchange.InvenTreeManualExchangeBackend' email_config = CONFIG.get('email', {}) EMAIL_BACKEND = get_setting( - 'django.core.mail.backends.smtp.EmailBackend', - email_config.get('backend', '') + 'INVENTREE_EMAIL_BACKEND', + email_config.get('backend', 'django.core.mail.backends.smtp.EmailBackend') ) # Email backend settings @@ -537,6 +537,11 @@ EMAIL_HOST_PASSWORD = get_setting( email_config.get('password', ''), ) +DEFAULT_FROM_EMAIL = get_setting( + 'INVENTREE_EMAIL_SENDER', + email_config.get('sender', ''), +) + EMAIL_SUBJECT_PREFIX = '[InvenTree] ' EMAIL_USE_LOCALTIME = False diff --git a/InvenTree/config_template.yaml b/InvenTree/config_template.yaml index e9f32f382e..0a86d88827 100644 --- a/InvenTree/config_template.yaml +++ b/InvenTree/config_template.yaml @@ -85,6 +85,7 @@ email: port: 25 username: '' password: '' + sender: '' tls: False ssl: False