docs: Clean up email testing docs a bit more.

This commit is contained in:
Tim Abbott 2020-10-30 12:14:37 -07:00
parent f2b9109be5
commit cba7425cdc
2 changed files with 20 additions and 19 deletions

View File

@ -61,32 +61,33 @@ custom backend, `EmailLogBackEnd`. It does the following:
### Testing in a real email client ### Testing in a real email client
You can also forward all the emails sent in the development environment You can also forward all the emails sent in the development
to an email id of your choice by clicking on **Forward emails to a mail environment to an email account of your choice by clicking on
account** in `/emails` page. This feature can be used for testing how **Forward emails to an email account** on the `/emails` page. This
emails gets rendered by different email clients. feature can be used for testing how the emails gets rendered by
actual email clients. This is important because web email clients
have limited CSS functionality, autolinkify things, and otherwise
mutate the HTML email one can see previewed on `/emails`.
For using this feature you need to have access to the login To do this sort of testing, you need to setup an outgoing SMTP
credentials of an SMTP provider. The easiest way to do this would be provider. Our production advice for
to use Gmail as the SMTP provider. Go through [this [Gmail](../production/email.html#using-gmail-for-outgoing-email) and
doc](../production/email.html#using-gmail-for-outgoing-email) and [transactional email
configure a Gmail account to allow sending emails using SMTP. You can providers](../production/email.html#free-outgoing-email-services) are
ignore the warning to avoid using Gmail for sending emails, since the relevant; you can ignore the Gmail warning as Gmail's rate limits are
anti-spam problems described there aren't relevant for testing use. appropriate for this sort of low-volume testing.
The services we [recommend for production Once you have the login credentials of the SMTP provider, since there
use](../production/email.html#free-outgoing-email-services) are great is not `/etc/zulip/settings.py` in development, configure it using the
choices as well. following keys in `zproject/dev-secrets.conf`
Once you have the login credentials of the SMTP provider, set the appropriate value
of the following keys in `zproject/dev-secrets.conf`
* `email_host` - SMTP hostname. * `email_host` - SMTP hostname.
* `email_port` - SMTP port. * `email_port` - SMTP port.
* `email_host_user` - Username of the SMTP user * `email_host_user` - Username of the SMTP user
* `email_password` - Password of the SMTP user. * `email_password` - Password of the SMTP user.
Here is an example of how `zproject/dev-secrets.conf` would look if you are using Gmail. Here is an example of how `zproject/dev-secrets.conf` might look if
you are using Gmail.
``` ```
email_host = smtp.gmail.com email_host = smtp.gmail.com

View File

@ -14,7 +14,7 @@
<strong>Show text only version</strong> <strong>Show text only version</strong>
</label> </label>
<a href="#" data-toggle="modal" data-target="#forward_email_modal"> <a href="#" data-toggle="modal" data-target="#forward_email_modal">
<strong>Forward emails to a mail account</strong> <strong>Forward emails to an email account</strong>
</a> </a>
</div> </div>
</div> </div>