Properly use TLS in Django for email

This setting has been missing for quite some time and
needs to be added. While it is mostly assumed Adjutant
is running on the same network as the email server itself
TLS should really always have been used. We now have the
setting to properly turn this on and use it.

Change-Id: Ib6d54829d58df87a4b606ca316052418f5a1cfa5
This commit is contained in:
Adrian Turjak 2018-04-05 12:58:27 +12:00
parent f1531201f6
commit 59fc30c993
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ EMAIL_HOST = CONFIG['EMAIL_SETTINGS'].get('EMAIL_HOST')
EMAIL_PORT = CONFIG['EMAIL_SETTINGS'].get('EMAIL_PORT')
EMAIL_HOST_USER = CONFIG['EMAIL_SETTINGS'].get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = CONFIG['EMAIL_SETTINGS'].get('EMAIL_HOST_PASSWORD')
EMAIL_USE_TLS = CONFIG['EMAIL_SETTINGS'].get('EMAIL_USE_TLS', False)
EMAIL_USE_SSL = CONFIG['EMAIL_SETTINGS'].get('EMAIL_USE_SSL', False)
# setting to control if user name and email are allowed
# to have different values.