CharSet = "utf-8";"; and finally save the file."/> CharSet = "utf-8";"; and finally save the file.">

Home  >  Article  >  Backend Development  >  What to do if php emails send garbled characters

What to do if php emails send garbled characters

藏色散人
藏色散人Original
2020-07-04 09:30:542520browse

Solution to php sending garbled emails: first find and open the corresponding file; then add a line of code as "$mail->CharSet = "utf-8";"; and finally save the file.

What to do if php emails send garbled characters

php sent email garbled code: (missing the red part)

$mail = new PHPMailer();

                                                                                                                                                                                             $mail ->Username = $youremail;

                                                                                                                                                                                                                                                                                     ​

                                                                                                                             #$mail->CharSet = "utf-8";

For more related knowledge, please visit

PHP Chinese website

!

The above is the detailed content of What to do if php emails send garbled characters. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn