Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Document how to use SMTP without authentication.
Alex Vandiver015a10637b8e
diff --git a/docs/production/email.md b/docs/production/email.mdindex 55116e47994..e0bd38cb020 100644--- a/docs/production/email.md+++ b/docs/production/email.md@@ -12,7 +12,9 @@ email addresses and send notifications.1. Fill out the section of `/etc/zulip/settings.py` headed "Outgoingemail (SMTP) settings". This includes the hostname and typicallythe port to reach your SMTP provider, and the username to log in to- it. You'll also want to fill out the noreply email section.+ it. If your SMTP server does not require authentication, leave+ `EMAIL_HOST_USER` empty. You'll also want to fill out the noreply+ email section.1. Put the password for the SMTP user account in`/etc/zulip/zulip-secrets.conf` by setting `email_password`. Fordiff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.pyindex 74db535f701..17637bb2461 100644--- a/zerver/lib/send_email.py+++ b/zerver/lib/send_email.py@@ -599,5 +599,6 @@ def log_email_config_errors() -> None:"""if settings.EMAIL_HOST_USER and settings.EMAIL_HOST_PASSWORD is None:logger.error(- "An SMTP username was set (EMAIL_HOST_USER), but password is unset (EMAIL_HOST_PASSWORD)."+ "An SMTP username was set (EMAIL_HOST_USER), but password is unset (EMAIL_HOST_PASSWORD). "+ "To disable SMTP authentication, set EMAIL_HOST_USER to an empty string.")diff --git a/zerver/tests/test_send_email.py b/zerver/tests/test_send_email.pyindex 3006e36cea9..d274a3e70ac 100644--- a/zerver/tests/test_send_email.py+++ b/zerver/tests/test_send_email.py@@ -165,7 +165,8 @@ class TestSendEmail(ZulipTestCase):error_log.output,["ERROR:zulip.send_email:"- "An SMTP username was set (EMAIL_HOST_USER), but password is unset (EMAIL_HOST_PASSWORD)."+ "An SMTP username was set (EMAIL_HOST_USER), but password is unset (EMAIL_HOST_PASSWORD). "+ "To disable SMTP authentication, set EMAIL_HOST_USER to an empty string."],)diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.pyindex 157cf8e2878..68f6d504b57 100644--- a/zproject/prod_settings_template.py+++ b/zproject/prod_settings_template.py@@ -71,7 +71,9 @@ EXTERNAL_HOST = "zulip.example.com"## advice for troubleshooting, see the Zulip documentation:## https://zulip.readthedocs.io/en/latest/production/email.html-## EMAIL_HOST and EMAIL_HOST_USER are generally required.+## EMAIL_HOST and EMAIL_HOST_USER are generally required. If your+## SMTP server does not require authentication, leave EMAIL_HOST_USER+## commented out.# EMAIL_HOST = "smtp.example.com"# EMAIL_HOST_USER = ""