Site name with special characters causes mail send to fail

Created on 27 August 2024, 8 months ago
Updated 8 February 2025, 3 months ago

Problem/Motivation

The system site_name config value is used as the from name to send emails. When the site name contains special characters (like an HTML br tag), there is an error in the sending of the email. This may be a core issue, but it may still be possible to prevent the problem here?

This is the error recorded in the watchdog table under symfony_mailer_lite:
An attempt to send an e-mail message failed, and the following error message was returned : Email "br>Security"

Steps to reproduce

Change site name to something like: My
Site

Proposed resolution

Run strip tags from site name before setting it to the from address header.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States shelane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024