Submit the order and send it to the mailbox using sendmail. garbled characters are read from the database. how to deal with this?-php Tutorial

Source: Internet
Author: User
When you submit an order and send it to your mailbox via sendmail, garbled theme is read from the database: your haha has a new order & nbsp; Date: 2011100215: 58: 14 & nbsp; Sender: & quot; [email & #160; protected] & quot; & lt; [email & #160; protected] & gt; add to contact-email-SMS submit order and send sendmail to email address. garbled characters are read from the database.
Subject: you have a new order
Date: 15:58:14
Sender: "[email protected]" <[email protected]> add to contact> send to Mail> reply to SMS> reject to hide more
Recipient: [email protected]
CC:
Attachment:
Topic: you have a new order


Purchased products: * zookeeper, parent, and other zookeeper, zookeeper = 328 billion RMB?
Subscriber: Zookeeper zookeeper?
Mobile phone: 1331111111
Shipping Address: zookeeper or zookeeper?
Remarks:


The above garbled characters are the order information read from the database. the ordering items and orderers are written in the sendmail function. I don't know why.


------ Solution --------------------
Basically, Chinese garbled characters are encoding problems. check whether the encoding in your email database is garbled or not.
What encoding is displayed now, and then convert between the UTF-8 and gbk to see iconv or use mb_convert_encoding
------ Solution --------------------
Encoding problems,
1. is the data in your database garbled?
2. check the encoding settings on the page.
------ Solution --------------------
Needless to say, it must be your encoding problem.

Can you send your email template content and sendmail. php code to you.

This may be better.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.