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

What to do if php emails send garbled characters

藏色散人
Release: 2023-03-01 21:44:01
Original
2564 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template