Working with
an outside company that sends automated emails
to us, these emails are html formatted, but when they arrive
the html tags are missing almost every < symbol and added
were chinese characters throughout. It looked something like
this : "ℼDOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN"> 䠼TML>䠼EAD> 䴼ETA http-equiv=Content-Type
content="text/html; charset=unicode"> 㰊META content="MSHTML
5.50.4807.2300" name=GENERATOR>⼼HEAD> 㰊BODY㰾FONT size=2> 吼
ABLE border=1> 吼R> 吼D>䘼ONT size=2>"
to us, these emails are html formatted, but when they arrive
the html tags are missing almost every < symbol and added
were chinese characters throughout. It looked something like
this : "ℼDOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN"> 䠼TML>䠼EAD> 䴼ETA http-equiv=Content-Type
content="text/html; charset=unicode"> 㰊META content="MSHTML
5.50.4807.2300" name=GENERATOR>⼼HEAD> 㰊BODY㰾FONT size=2> 吼
ABLE border=1> 吼R> 吼D>䘼ONT size=2>"
Took a while
to find the issue and resolution. Turns out
that the MIME type in the header didn't match either the
encoding type of the email, or our legal notice that gets
added was in a different encoding type, which made Exchange
mess up all of the tags. It could also be because Outlook
uses Word as its HTML viewer instead of IE.
The solution is to add a line to the
edgetransport.exe.config file,
key="DisableDetectEncodingFromMetaTag" value="true"
/>
This forces Exchange to figure out the encoding on its own
and not trust the MetTag
that the MIME type in the header didn't match either the
encoding type of the email, or our legal notice that gets
added was in a different encoding type, which made Exchange
mess up all of the tags. It could also be because Outlook
uses Word as its HTML viewer instead of IE.
The solution is to add a line to the
edgetransport.exe.config file,
This forces Exchange to figure out the encoding on its own
and not trust the MetTag
No comments:
Post a Comment