Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Mime] QpContentEncoder removes intentional line break #49295

@fforsthuber

Description

@fforsthuber

Symfony version(s) affected

6.2.5

Description

[symfony/mime] QpContentEncoder removes intentional line break

Under certain conditions Symfony\Component\Mime\Encoder\QpContentEncoder seems to remove an intentional line break in the rendered email body.
When i set the the body text via Symfony\Component\Mime\Email::text() with the following value:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaa

i receive the follwing rendered email body:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

The raw quoted printable text will be:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=

aaaaaaaaaaaaaaaaaaaaaaaaa

I would expect that the line break here is rendered as it was placed in the Email::text() argument.

Thanks for your support

How to reproduce

To reproduce the issue i prepared a setup with mailhog:
https://github.com/fforsthuber/sf-mailer-line-break-problem

See README for setup

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions