8000 [Mailer] Parens in From name header are ignored in Outlook · Issue #45040 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Mailer] Parens in From name header are ignored in Outlook  #45040
Closed
@iluuu1994

Description

@iluuu1994

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 (...).

Thunderbird:
image

Outlook:
image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0