Use the UTF-8 encoding/jmail component to send mail garbled questions.

Source: Internet
Author: User
A long time ago, I heard from a friend that using UTF-8 code to send an email may contain garbled characters. Recently for the company to develop a website that supports multiple languages, just to use UTF-8 encoding. The website has Member registration, Query Form and other modules all need to send an email to the registered user or administrator. I was puzzled to avoid a conflict with this garbled problem.

The strange thing is that the project has been running smoothly, although the Chinese characters in the email are indeed garbled on the webpage. However, if you use outlook or Foxmail, you can check it locally. Haha, what is the garbled characters that mofei's friends refer? It seems that the problem is not big. I uploaded the website to the server and handed it to another group for testing.

The next day, just as I was listening to songsArticleThe colleague reported that the email was garbled. I was shocked and immediately tried it. I was still a question mark after receiving it with Foxmail. I followed the example by Google. I want to see if anyone has encountered the same problem, but there is nothing to find. After that, I went to the dimc.net (jmail official website) Forum for a long time and failed to solve the problem. It seems that you only rely on yourself...

After two hours of continuous modification on the serverCodeTest the email sending. The problem is not improved.

Start with the difference between the local computer and the server. First, the jmail version of the server is updated when the jmail version is different. Invalid. I don't think the problem lies in the website.ProgramAnd jmail components. In order to determine the key issue, the content that has been assigned to jmail is output before the mail is sent. Sure enough, the content of the email here is garbled. My operating system is installed with the Simplified Chinese version, the server is above the English version, and finally. Try advanced in the region and language options. The non-Unicode program language uses Chinese. After restarting the server, the problem is finally solved...

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.