Closed (fixed)
Project:
SMTP Authentication Support
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2016 at 11:24 UTC
Updated:
12 Jun 2018 at 12:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ramdas gaikar commentedI can see the default encoding set in PHPMailer.php file is as below :
/**
* Sets the Encoding of the message. Options for this are
* "8bit", "7bit", "binary", "base64", and "quoted-printable".
* @var string
*/
public $Encoding = '8bit';
Also I can see the below function does the Encoding of Header including From Name.
public function EncodeHeader($str, $position = 'text');
So someone who can dig little more, will get the issue.
Comment #3
artem0793 commentedComment #4
asermc commentedHi!
Do you have a way or idea to resolve this problem?
thanks a lot
Comment #5
jjcarrionI have the same problem with Swedish characters, but I have it in the subject as well.
I have tried different things:
hook_mail_alter:
With this, the subject was fixed but I couldn't change the From at all.
Changing the CharSet in PHPMailer
I did something like $mailer->CharSet = 'utf-8'; but it didn't work.
So, finally I did what I have in the patch and that solved my problem but I don't think that this is a general solution.
If we could change the PHPMailer Charset, maybe we could create a setting for that so the user could set the CharSet that they need for their project. Any ideas on this?
Comment #6
petergus commentedI ended up using the patch at https://www.drupal.org/node/2865880 because this didn't really work, especially for the Reply-to name.
Did you find any other solution yet?
Comment #7
recidive commentedAttached is a patch that uses the
Unicode::mimeHeaderEncode()instead oficonv_mime_encode(). And apply the encoding to From, ReplyTo, CC, BCC and Subject.Comment #8
artem0793 commentedComment #9
swentel commentedThe Unicode::mimeHeaderEncode() seems logical, especially since PhpMail does this as well!
Comment #10
hanness#7 worked fine for us. tested with subject and from.
Comment #11
c-logemannSuccessfully tested patch #7 and added to patch management of two productive websites. So +1 for RTBC
Comment #12
keopx+1 for RTBC
Comment #13
fall_0ut commentedTested with patch #7, works fine
Comment #14
ismail cherri commentedTest patch #7 and it is working fine.
Comment #15
mgstablesTested patch #7 and it is working
Comment #16
wundo commentedComment #18
wundo commented