mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
emails: Added placeholders strings in FormAddress.
We've had a bug for a while that if any ScheduledEmail objects get created with the wrong email sender address, even after the sysadmin corrects the problem, they'll still get errors because of the objects stored with the wrong format. We solve this by using FromAddress placeholders strings in send_future_email function, so that ScheduledEmail objects end up setting the final `from_address` value when mail is actually sent using the setting in effect at that time. Fixes #11008.
This commit is contained in:
@@ -546,7 +546,7 @@ def enqueue_welcome_emails(user: UserProfile, realm_creation: bool=False) -> Non
|
||||
from_address = settings.WELCOME_EMAIL_SENDER['email']
|
||||
else:
|
||||
from_name = None
|
||||
from_address = FromAddress.SUPPORT
|
||||
from_address = FromAddress.support_placeholder
|
||||
|
||||
other_account_count = UserProfile.objects.filter(
|
||||
delivery_email__iexact=user.delivery_email).exclude(id=user.id).count()
|
||||
|
||||
Reference in New Issue
Block a user