I heard from a friend a long time ago that if you use UTF-8 encoding to send emails, garbled characters will occur. Recently, I developed a multi-language website for my company, which happened to use UTF-8 encoding. The website has member registration, query form and other modules that need to send emails to registered users or administrators. I was thinking that I would inevitably have a head-on conflict with this garbled code problem.
The strange thing is that the project has been progressing smoothly, although the Chinese in the email will indeed be garbled when viewed on the web page. However, it is normal to view it locally after using Outlook or Foxmail. Ha, could this be the garbled code that my friend pointed out? It seemed that the problem was not serious, so I uploaded the website to the server and handed it over to another group for testing.
The next day, while I was leisurely listening to music and reading articles, my colleague over there reported that the emails I received would be garbled. I was shocked and tried it immediately. Sure enough, after I received it in Foxmail and opened it, there was still a question mark. I did a Google search to see if anyone had encountered the same problem, but found nothing. After that, I went to the forum of dimc.net (the official website of Jmail) for a long time, but could not solve the problem. It seems that I have to rely on myself. . .
After two hours of constantly modifying the code on the server to send emails for testing, the problem has not improved.
So I started to look at the differences between the local computer and the server. First I found that the jmail version was inconsistent, so I updated the server's jmail version. invalid. I feel that the problem is not with the website program or Jmail component. In order to determine the key to the problem, the content that has been assigned to Jmail was output before the email was sent. Sure enough, the content of the email here was garbled. My operating system is installed with the Simplified Chinese version, and the one on the server is the English version. Finally. Try selecting Chinese in the Advanced, Non-Unicode Program Language in the Region and Language Options. After restarting the server, the problem is finally solved.