Closed
Description
Symfony version(s) affected
v5.3.13
Description
Currently the mailer generates the From
header with no quotes when parens are used.
From: Foo (Bar) foo.bar@example.com
Looking at rfc5322 this seems to be fine. Unfortunately, Outlook silently throw away the (...)
.
Adding quotes around the name seems to do the trick.
From: "Foo (Bar)" foo.bar@example.com
How to reproduce
$email = (new Email())
->to($to)
->from(Address::create('Foo (Bar) <foo.bar@example.com'))
->subject('Test')
->text('Test');
$this->mailer->send($email);
Possible Solution
We could quote all address names but since tests could rely on their absence it might be better to only add them for this case.
Additional Context
No response