Skip to content

[Mailer] Parens in From name header are ignored in Outlook  #45040

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy