Display names containing a comma cause error

Created on 29 March 2023, almost 2 years ago

Problem/Motivation

In Legacy Mode using a comma in a display name will cause an error.
Error sending email: Email ""Lastname" does not comply with addr-spec of RFC 2822.

Steps to reproduce

Try sending a mail to a recipient with a display name containing a comma.

Drupal::service('plugin.manager.mail')->mail('webform', 'key', '"Lastname, Firstname" <firstname.lastname@example.com>', 'en');

Proposed resolution

MailHelper splits address parts using explode. This should be improved by matching comma seperated parts taking quoted strings into account.

๐Ÿ› Bug report
Status

Active

Version

1.2

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany hosterholz

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