symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

How to set encoder(8bit,base64 or quoted-printable) in symfony mailer

Open adnan-rasheed opened this issue 2 years ago • 3 comments

adnan-rasheed avatar May 19 '22 14:05 adnan-rasheed

Can you please elaborate a bit more what piece of information you are missing?

xabbuh avatar May 26 '22 12:05 xabbuh

@xabbuh there is an option in php mailer for setting content transfer encoding to one of these methods 8bit,base64, 7bit & quoted-printable. Also there is way to set encoding method in swiftmailer but in symfony I did not see any documentation to set one of the value from above methods

adnan-rasheed avatar May 31 '22 16:05 adnan-rasheed

I think we need an easy way to configure that in the code itself first (see symfony/symfony#44557).

xabbuh avatar Jul 04 '22 09:07 xabbuh

In SwiftMailer 5.x we had setEncoder + get8BitEncoding etc. so you could do

$message->setEncoder(\Swift_Encoding::get8BitEncoding());

However, this was removed in 6.x: https://github.com/swiftmailer/swiftmailer/commit/d210d674809310dac02da09b372bf74a8047c2ab

fritzmg avatar Aug 14 '23 08:08 fritzmg

I'm wondering why this was removed? :thinking: I can't find a good solution to encode emails other than quoted-printable. Anyone?

mpichot avatar Aug 31 '23 12:08 mpichot

I'm closing this one because the related code issue was closed after "expiring" (https://github.com/symfony/symfony/issues/44557).

Please, try to ask about this in the GitHub Discussions or Slack chat shown in https://symfony.com/support If there's enough interest, the next step would be to create an issue in the code repository and try to gather some support for it. Finally, there could be a PR in the code repository and then we would document it here.

Thanks for understanding.

javiereguiluz avatar Sep 04 '23 12:09 javiereguiluz

No need to create a new issue. The last comment in the original issue states:

Feel free to comment if this is still relevant, I can always reopen!

fritzmg avatar Sep 04 '23 12:09 fritzmg