mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
send_test_email: Send email from NOREPLY address as well.
Tweaked by tabbott to also set different subject lines, to make it easier to see that one got 2 emails.
This commit is contained in:
committed by
Tim Abbott
parent
08d7e113db
commit
018a33ff7c
@@ -104,7 +104,9 @@ su zulip
|
||||
```
|
||||
|
||||
If it doesn't throw an error, it probably worked; you can confirm by
|
||||
checking your email.
|
||||
checking your email. You should get two emails: One sent by a the
|
||||
default From address for your Zulip server, and one sent by the
|
||||
"noreply" From address.
|
||||
|
||||
If it doesn't work, check these common failure causes:
|
||||
|
||||
@@ -112,6 +114,9 @@ If it doesn't work, check these common failure causes:
|
||||
firewall rules. Check whether the port `EMAIL_PORT` is blocked in
|
||||
your hosting provider's firewall.
|
||||
|
||||
* Your SMTP server's permissions might not allow the email account
|
||||
you're using to send email from the `noreply` email address.
|
||||
|
||||
* Make sure you set the password in `/etc/zulip/zulip-secrets.conf`.
|
||||
|
||||
* Check the username and password for typos.
|
||||
|
||||
@@ -13,17 +13,16 @@ class Command(sendtestemail.Command):
|
||||
if settings.WARN_NO_EMAIL:
|
||||
raise CommandError("Outgoing email not yet configured, see\n "
|
||||
"https://zulip.readthedocs.io/en/latest/production/email.html")
|
||||
subject = "Zulip Test email"
|
||||
message = ("Success! If you receive this message, you've "
|
||||
"successfully configured sending email from your "
|
||||
"Zulip server. Remember that you need to restart "
|
||||
"the Zulip server with /home/zulip/deployments/current/scripts/restart-server "
|
||||
"after changing the settings in /etc/zulip before your changes will take effect.")
|
||||
sender = FromAddress.SUPPORT
|
||||
send_mail(subject, message, sender, kwargs['email'])
|
||||
send_mail("Zulip email test", message, FromAddress.SUPPORT, kwargs['email'])
|
||||
send_mail("Zulip noreply email test", message, FromAddress.NOREPLY, kwargs['email'])
|
||||
|
||||
if kwargs['managers']:
|
||||
mail_managers(subject, "This email was sent to the site managers.")
|
||||
mail_managers("Zulip manager email test", "This email was sent to the site managers.")
|
||||
|
||||
if kwargs['admins']:
|
||||
mail_admins(subject, "This email was sent to the site admins.")
|
||||
mail_admins("Zulip admins email test", "This email was sent to the site admins.")
|
||||
|
||||
Reference in New Issue
Block a user