Tutorial :How do I send Asian charset plaintext emails in ASP.NET?



Question:

I have an ASP.NET application that needs to send emails in Korean. These emails are sent in plaintext.

But when the emails are received, they look like this:

? First name? ??: ?????.

?? ???? ???? ?? ??? ??? ?? ???? ???? ????? ???? ????. ??????? ??? ????? ???? ??? ??1-888-123-4567 ? ??????? ?? info@example.com ?? ?????? ???? ??? ??????.

Currently I'm not setting the encoding. Just using the default. Ideally, I would like the encoding to work with all sorts of emails. Hopefully I don't have to set the encoding on a per-email basis.


Solution:1

You basically have 2 ways to encode email parts:

  1. Using the Korean Code page for your email so people not using Unicode can still view it (charsets like ISO-2022-KR and x-windows-949, I don't know which of the 3 is the most common):

    Content-Type: text/plain;  charset="EUC-KR"  Content-Transfer-Encoding: quoted-printable  
  2. Using UTF8 encoding, which is the preferred way nowadays.
    In any case, the recipient must have proper support for Asian languages installed on their machine for the message to display correctly.

    Content-Type: text/plain; charset=UTF-8;  Content-Transfer-Encoding: 8bit  

Here are a couple of good articles that explain how to implement this properly:


Solution:2

Try setting the encoding of the email to UTF-8.

I think this would be the line you need in the email headers:

Content-Type: text/plain; charset=UTF-8  

Hope this helps

Adam


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »