asp.net mvc - English Email Displays Chinese-like Characters -


i'm using postal send emails html , text portion.

when email sent gmail, displayed correctly. however, when displayed in @ least 2 other email systems (mail enable's webmail interface, , unknown system @ client), text rendered similar chinese. when client forwards email gmail account, "chinese" rendering visible.

example email generated:

x-sender: no-reply@thecompany.com x-receiver: therecipient@thecompany.com mime-version: 1.0 from: no-reply@thecompany.com to: therecipient@thecompany.com date: 17 apr 2013 22:11:25 -0700 subject: subject content-type: multipart/alternative;  boundary=--boundary_0_83808b99-ef32-4f47-8835-ba4a435a2141   ----boundary_0_83808b99-ef32-4f47-8835-ba4a435a2141 content-type: text/plain; charset=utf-16 content-transfer-encoding: base64  mime encoded contents here== ----boundary_0_83808b99-ef32-4f47-8835-ba4a435a2141 content-type: text/html; charset=utf-16 content-transfer-encoding: base64  mime encoded contents here= ----boundary_0_83808b99-ef32-4f47-8835-ba4a435a2141-- 

clearly there encoding issue gmail somehow sorts out other email servers not, issue?

the charset specified utf-16. postal (or mvc engine) in fact generate utf-8 output? how can control encoding of output and/or charset specified in email header?

the character encoding can explicitly set utf-8 adding headers

content-type: text/plain; charset=utf-8 , content-type: text/html; charset=utf-8 

see article more information.

note: there typo in article. text/plain line missing semicolon. corrected in example above.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -