Merge pull request #1505 from eeintech/email_reset

Enabled default email sender setting
This commit is contained in:
Oliver 2021-04-22 08:50:05 +10:00 committed by GitHub
commit c5b6e22a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -85,6 +85,7 @@ email:
port: 25
username: ''
password: ''
sender: ''
tls: False
ssl: False