6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 14:17:46 +00:00

Add support for external SMTP server with TLS

Note that this setting will not work with the default namshi smtp server
shipped with tutor.

Close #231.
This commit is contained in:
Régis Behmo 2019-07-07 09:06:35 +08:00
parent 69d3ba72a7
commit a68dc4f68f
5 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Latest
- [Improvement] Add support for TLS in external SMTP server (#231)
- [Bugfix] Fix missing video transcripts in LMS (#229)
- [Improvement] Make it possible to enable/disable multiple plugins at once
- [Improvement] Add 'local-docker-compose-nginx-volumes' patch

View File

@ -140,6 +140,9 @@ SMTP
- ``SMTP_PORT`` (default: ``25``)
- ``SMTP_USERNAME`` (default: ``""``)
- ``SMTP_PASSWORD`` (default: ``""``)
- ``SMTP_USE_TLS`` (default: ``false``)
Note that the SMTP server shipped with Tutor by default does not implement TLS.
SSL/TLS certificates for HTTPS access
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -30,6 +30,7 @@
"EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
"EMAIL_HOST": "{{ SMTP_HOST }}",
"EMAIL_PORT": {{ SMTP_PORT }},
"EMAIL_USE_TLS": {{ "true" if SMTP_USE_TLS else "false" }},
"HTTPS": "{{ "on" if ACTIVATE_HTTPS else "off" }}",
"LANGUAGE_CODE": "{{ LANGUAGE_CODE }}",
{% if ACTIVATE_HTTPS %}"SESSION_COOKIE_DOMAIN": ".{{ LMS_HOST|common_domain(CMS_HOST) }}",{% endif %}

View File

@ -36,6 +36,7 @@
"EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
"EMAIL_HOST": "{{ SMTP_HOST }}",
"EMAIL_PORT": {{ SMTP_PORT }},
"EMAIL_USE_TLS": {{ "true" if SMTP_USE_TLS else "false" }},
"HTTPS": "{{ "on" if ACTIVATE_HTTPS else "off" }}",
"LANGUAGE_CODE": "{{ LANGUAGE_CODE }}",
"LOGIN_REDIRECT_WHITELIST": ["{{ CMS_HOST }}", "studio.localhost"],

View File

@ -66,4 +66,5 @@ SMTP_HOST: "smtp"
SMTP_PORT: 25
SMTP_USERNAME: ""
SMTP_PASSWORD: ""
SMTP_USE_TLS: false
WEB_PROXY: false