mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +00:00
settings: Set a flag when email isn't configured, so we can warn.
This commit is contained in:
@@ -51,10 +51,12 @@ ZULIP_ADMINISTRATOR = 'zulip-admin@example.com'
|
|||||||
# /home/zulip/deployments/current/manage.py send_test_email username@example.com
|
# /home/zulip/deployments/current/manage.py send_test_email username@example.com
|
||||||
#
|
#
|
||||||
# A common problem is hosting provider firewalls that block outgoing SMTP traffic.
|
# A common problem is hosting provider firewalls that block outgoing SMTP traffic.
|
||||||
EMAIL_HOST = 'smtp.gmail.com'
|
#
|
||||||
EMAIL_HOST_USER = ''
|
#EMAIL_HOST = 'smtp.gmail.com'
|
||||||
EMAIL_PORT = 587
|
#EMAIL_HOST_USER = ''
|
||||||
EMAIL_USE_TLS = True
|
#EMAIL_PORT = 587
|
||||||
|
#EMAIL_USE_TLS = True
|
||||||
|
EMAIL_HOST = None
|
||||||
|
|
||||||
## OPTIONAL SETTINGS
|
## OPTIONAL SETTINGS
|
||||||
|
|
||||||
|
|||||||
@@ -273,6 +273,10 @@ DEFAULT_SETTINGS.update({
|
|||||||
# available for sysadmin override in unusual cases.
|
# available for sysadmin override in unusual cases.
|
||||||
'EMAIL_BACKEND': None,
|
'EMAIL_BACKEND': None,
|
||||||
|
|
||||||
|
# Whether to give admins a warning in the web app that email isn't set up.
|
||||||
|
# Set below when email isn't configured.
|
||||||
|
'WARN_NO_EMAIL': False,
|
||||||
|
|
||||||
# Whether to keep extra frontend stack trace data.
|
# Whether to keep extra frontend stack trace data.
|
||||||
# TODO: Investigate whether this should be removed and set one way or other.
|
# TODO: Investigate whether this should be removed and set one way or other.
|
||||||
'SAVE_FRONTEND_STACKTRACES': False,
|
'SAVE_FRONTEND_STACKTRACES': False,
|
||||||
@@ -1537,7 +1541,8 @@ elif DEVELOPMENT:
|
|||||||
# In the dev environment, emails are printed to the run-dev.py console.
|
# In the dev environment, emails are printed to the run-dev.py console.
|
||||||
EMAIL_BACKEND = 'zproject.email_backends.EmailLogBackEnd'
|
EMAIL_BACKEND = 'zproject.email_backends.EmailLogBackEnd'
|
||||||
elif not EMAIL_HOST:
|
elif not EMAIL_HOST:
|
||||||
# If an email host is not specified, fail silently and gracefully
|
# If an email host is not specified, fail gracefully
|
||||||
|
WARN_NO_EMAIL = True
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
||||||
else:
|
else:
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
|
|||||||
Reference in New Issue
Block a user