Skip to content

[Mailer] Postmark mailer cyrillic addresses names are not coded correctly (white space added) #48328

Closed
@nacholibre

Description

@nacholibre

Symfony version(s) affected

5.4.*

Description

I'm using symfony mailer with symfony/postmark-mailer via SMTP. When I send certain Cyrillic characters in the From sender name the delivered message From header has some white spaces in between the words.

How to reproduce

Versions:
symfony - 5.4.15
symfony/postmark-mailer - 5.4.7
symfony/mailer - 5.4.15

I'm using Postmark SMTP service.
MAILER_DSN=postmark+smtp://KEY_HERE@default

I'm sending email like so

$message = (new TemplatedEmail())
    ->subject($subject)
    ->from(new Address('some@email.com', 'Онлайн Онлайн Онлайн'))
    ->to('receiver@email.com')
    ->text('test')
;

Here is the raw email from symfony debugger:

Subject: =?utf-8?Q?=D0=A1=D1=8A=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?=
 =?utf-8?Q?=D0=B5_=D0=BA=D1=8A=D0=BC_=D0=BF=D0=BE=D1=80=D1=8A=D1=87=D0=BA?=
 =?utf-8?Q?=D0=B0_=E2=84=96745234?=
From: =?utf-8?Q?=D0=9E=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD_=D0=9E?=
 =?utf-8?Q?=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD_=D0=9E=D0=BD?=
 =?utf-8?Q?=D0=BB=D0=B0=D0=B9=D0=BD?= <some@email.com>
To: receiver@email.com
MIME-Version: 1.0
Date: Fri, 25 Nov 2022 15:34:40 +0200
Message-ID: <55183a30a669e375fd0498e148cf6603@email.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

test

Now decoding the From part using this tool https://dogmamix.com/MimeHeadersDecoder/ gives me

From: Онлайн Онлайн Онлайн <some@email.com>

Which is correct.

But when postmark delivers this message (to gmail for example) the from part is altered to:

From: "Онлайн О нлайн Он лайн" <some@email.com>

I assume this behaviour is due to the fact that the from part is split into three lines, decoding them separately gives me

 =?utf-8?Q?=D0=9E=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD_=D0=9E?=
 =?utf-8?Q?=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD_=D0=9E=D0=BD?=
 =?utf-8?Q?=D0=BB=D0=B0=D0=B9=D0=BD?=

=?utf-8?Q?=D0=9E=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD_=D0=9E?= is decoded to Онлайн О
=?utf-8?Q?=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD_=D0=9E=D0=BD?= is decoded to нлайн Он
=?utf-8?Q?=D0=BB=D0=B0=D0=B9=D0=BD?= is decoded to лайн

It seems that after each chunk white space is added (using Postmark). And the From part is Онлайн О нлайн Он лайн. Now the question is, is this SMTP client issue or this problem is entirely on the Postmark side?

I've wrote to the Postmark support describing this same problem, but they are telling me it's a client issue.

I've used postfix with this exact same setup and I didn't have any problems. This is why I was leaning towards the idea that it's a Postmark issue initially, but support assured me that it’s client problem.

Possible Solution

No response

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