mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
emails: Remove referrer name from 'From' header in invitation emails.
We should only show the referrer name in subject of invitation emails, and show only 'Zulip' in the 'From' header. This helps in preventing the email from being marked as suspicious by the detection systems when they see an employee's name as sender of an email sent from an unrelated domain. The behavior is already the same for reminder invitation emails where we do not show name and only 'Zulip' in the 'From' header. Fixes #18256.
This commit is contained in:
@@ -6480,11 +6480,9 @@ def do_send_confirmation_email(invitee: PreregistrationUser, referrer: UserProfi
|
||||
"activate_url": activation_url,
|
||||
"referrer_realm_name": referrer.realm.name,
|
||||
}
|
||||
from_name = f"{referrer.full_name} (via Zulip)"
|
||||
send_email(
|
||||
"zerver/emails/invitation",
|
||||
to_emails=[invitee.email],
|
||||
from_name=from_name,
|
||||
from_address=FromAddress.tokenized_no_reply_address(),
|
||||
language=referrer.realm.default_language,
|
||||
context=context,
|
||||
|
||||
Reference in New Issue
Block a user