mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
send_email: Add support for multiple recipients.
This adds a function that sends provided email to all administrators of a realm, but in a single email. As a result, send_email now takes arguments to_user_ids and to_emails instead of to_user_id and to_email. We adjust other APIs to match, but note that send_future_email does not yet support the multiple recipients model for good reasons. Tweaked by tabbott to modify `manage.py deliver_email` to handle backwards-compatibily for any ScheduledEmail objects already in the database. Fixes #10896.
This commit is contained in:
committed by
Tim Abbott
parent
0fddf9a610
commit
92dc3637df
@@ -232,7 +232,7 @@ class ConfirmationEmailWorker(QueueProcessingWorker):
|
||||
send_future_email(
|
||||
"zerver/emails/invitation_reminder",
|
||||
referrer.realm,
|
||||
to_email=invitee.email,
|
||||
to_emails=[invitee.email],
|
||||
from_address=FromAddress.tokenized_no_reply_address(),
|
||||
context=context,
|
||||
delay=datetime.timedelta(days=2))
|
||||
|
||||
Reference in New Issue
Block a user