symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

SwiftMailer subject rewrite with no space #252

Closed MWMathieu closed 5 years ago

MWMathieu commented 6 years ago

symfony/symfony : 3.4.14 symfony/swiftmailer-bundle : 2.6.7

I want to send mail with this subject : "Invitation à un événement refusée" But i receive "Invitation à unévénement refusée". When i send mail with subject : "Invitation a un evenement refusee" i have no problem i receive the same string as subject.

Output of $message->getHeaders()->toString() : ..... Subject: Invitation =?utf-8?Q?=C3=A0?= un\r\n =?utf-8?Q?=C3=A9v=C3=A9nement_refus=C3=A9e?=\r\n .....

Do you have a fix for this ?

MWMathieu commented 6 years ago

if fix it with : $message->getHeaders()->get('Subject')->setLanguage('fr_FR')