stages/email: fix issue when sending emails to users with same display as email (#8850)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-03-08 15:42:01 +01:00
committed by GitHub
parent f66bad43db
commit cec11f3843
7 changed files with 29 additions and 6 deletions

View File

@ -481,7 +481,7 @@ class NotificationTransport(SerializerModel):
}
mail = TemplateEmailMessage(
subject=subject_prefix + context["title"],
to=[f"{notification.user.name} <{notification.user.email}>"],
to=[(notification.user.name, notification.user.email)],
language=notification.user.locale(),
template_name="email/event_notification.html",
template_context=context,