Hướng dẫn phpmailer utf8
I try to use PHPMailer to send registration, activation. etc mail to users:
The How can I force to use UTF-8 coding to show my mail exactly the same on all mailboxes? I tried to convert the mail header width
Synchro 33.8k15 gold badges77 silver badges99 bronze badges asked Mar 22, 2010 at 10:40 1 If you are 100% sure $message contain ISO-8859-1 you can use utf8_encode as David says. Otherwise use mb_detect_encoding and mb_convert_encoding on $message. Also take note that
Should be replaced by:
And placed after the instantiation of the class (after the Also the default encoding of PHPMailer is
Take note that answered Mar 22, 2010 at 14:36
AlexVAlexV 22.2k16 gold badges86 silver badges119 bronze badges 4
line try this
answered May 6, 2013 at 14:00
user2354947user2354947 3253 silver badges2 bronze badges 1 Sorry for being late on the party. Depending on your server configuration, You may be required to specify character strictly with lowercase letters utf-8, otherwise it will be ignored. Try this if you end up here searching for solutions and none of answers above helps:
should be replaced with:
answered Feb 9, 2016 at 15:28
vzrvzr 951 silver badge7 bronze badges 1 When non of the above works, and still mails looks like
answered Feb 12, 2020 at 16:03
Ohad CohenOhad Cohen 5,3383 gold badges36 silver badges35 bronze badges 2 I was getting ó in $mail->Subject /w PHPMailer. So for me the complete solution is:
Hope it helps. answered Nov 27, 2018 at 10:42
biojazzardbiojazzard 5534 silver badges8 bronze badges 0
answered May 28, 2016 at 4:59
1
The simplest way and will help you with is set CharSet to UTF-8
answered Dec 4, 2015 at 3:07
Trung BuiTrung Bui 1781 gold badge2 silver badges13 bronze badges 1 To avoid problems of character encoding in sending emails using the class PHPMailer we can configure it to send it with UTF-8 character encoding using the "CharSet" parameter, as we can see in the following Php code:
answered Mar 13, 2017 at 7:18
|