Chinese Characters PHPMailer

I'm using PHPMailer to send email from PHP. My email body contains HTML format and Chinese characters.

Chinese Characters are not shown correctly, it's changed to strange characters. I take the characters from database. It's shown perfectly if I view through web browser.

What variable of PHPMailer I have to initialize to solve this?

Any helps would be appreciated. Thank you.

Answers


You probably use wrong encoding for HTML body. Some important properties are:

$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->MsgHTML($your_html_body);
$mail->CharSet="UTF-8"; // <-- Put right encoding here

Need Your Help

Organizing data for gnuplot barcharts

plot gnuplot bar-chart

I'm trying to organize the data in the file.dat, such that I could then use gnuplot for bar chart creation. Namely, the current data looks like:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.