In .net, we often use MailMessage and SmtpMail to send letters. As long as the smtp server is configured well, there will generally be no major problems.
But recently when I was helping www.danceshopper.com to upgrade to multiple languages, I found that as long as it was a Traditional Chinese email, the subject was garbled and the content was garbled when it arrived in Hotmail. However, when I received it from the client using Foxmail or Outlook, the problem was not there. It exists, and similar problems will also appear in gmail [already solved]163 and other places, which troubled me for several days. After repeated summarization and testing, I got a solution to correctly send non-garbled emails.
In fact, it is very simple, that is, the encoding of your email must be correct. There are two things that need to be noted in the encoding here.
1 The charset in the email. For example, html emails must include <META http-equiv="Content-Type" content="text/html; charset=gb2312">
2 BodyEncoding, please obtain the language system where you send the letter. UTF8 cannot be used.
Why is it emphasized that utf8 cannot be used? My analysis is that hotmail, an old mailserver, may have been developed for a long time and cannot provide good support for the current evolution of HTML, especially things like utf8 unicode, but hotmail is not suitable for many people. It is an indispensable mailbox. I use it to send and receive my daily mail [I basically don’t use it, it’s too slow], so things like character sets must be mandatory. Many multi-lingual friends often talk to me about it because they are exposed to the powerful utf8. This issue has also been ignored. It is necessary to remind everyone here, haha, it needs to be restored to the original
source: the collection of thoughts and winds BLOG