Environment: Chinese w2k + apache + php4.06 (smtp on linux)
When I use the mail function to send a mail, I find that if my subject is in Chinese, the received mail will display Chinese as "XXXX"
The call process is as follows:
<? Php
$ To = "customer@263.net ";
$ Subject = "marketplace ";
$ Msg = "successfully registered member <br> ";
$ Msg. = "member name: wayne <br> ";
$ Msg. = "Password: wayne ";
$ Headers = "From: webmaster@263.netContent-Type: text/html; charset = gb2312 ";
Mail ("$ to", "$ subject", "$ msg", "$ headers ");
?>
After the program is called, use outlook6.0 to receive the mail and find that "mall" is displayed as "XXXX", while the Chinese in msg can be correctly displayed. Based on experience, you know to encode the subject. After clarifying the direction, I began to look for php encoding functions.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service