emails: Use referrer.delivery_email in invitation emails.

This commit is contained in:
Rishi Gupta 2019-08-22 13:29:51 -07:00 committed by Tim Abbott
parent e5482adec0
commit 2d260031ed
2 changed files with 2 additions and 2 deletions

View File

@ -4826,7 +4826,7 @@ def do_send_confirmation_email(invitee: PreregistrationUser,
Send the confirmation/welcome e-mail to an invited user.
"""
activation_url = create_confirmation_link(invitee, referrer.realm.host, Confirmation.INVITATION)
context = {'referrer_full_name': referrer.full_name, 'referrer_email': referrer.email,
context = {'referrer_full_name': referrer.full_name, 'referrer_email': referrer.delivery_email,
'activate_url': activation_url, 'referrer_realm_name': referrer.realm.name}
from_name = "%s (via Zulip)" % (referrer.full_name,)
send_email('zerver/emails/invitation', to_emails=[invitee.email], from_name=from_name,

View File

@ -228,7 +228,7 @@ class ConfirmationEmailWorker(QueueProcessingWorker):
context.update({
'activate_url': link,
'referrer_name': referrer.full_name,
'referrer_email': referrer.email,
'referrer_email': referrer.delivery_email,
'referrer_realm_name': referrer.realm.name,
})
send_future_email(