开发者

weird ! and space character while sending mail

So here is my situation : On a godaddy server, I've got a php script which sends periodically html emails (a kind of newsletters). And for a reason I can't explain, in some of the emails I send (always at t开发者_如何转开发he same exact spot), a ! character appear, along with an unusual space. Here are some example :

  • "I am ! so certa in" instead of "I am so certain"
  • "that anger ! at them" instead of "that anger at them"
  • "to be childre! n during" instead of "to be children during"

Some more details regarding the script's mechanics : it reads the content email from .html files (converted from a .doc file - I know that's a wierd idea, and the html code generated is shitty, the formatting aim to resolve this issue), does some formatting, and sends it with the appropriate headers. What I did try to diagnose the issue :

  • Tried to view the email with different software (from my gmail account, my old Windows live mail account and outlook). It's all the same.
  • Tried to change the charset of the email (from utf-8 to ISO-8859-1).
  • Made sure there was not any rogue character by using the html_entity_decode function.
  • Checked if the file on the server didn't get deformed for some random reason - and it's note.

So any idea about this?


Check how many characters in from the start of the line they appear. You may well find the same number. This is where the line is being artificially broken. The solution is to just make shorter lines. With HTML-based emails, this is not a problem, as html does ignore line breaks in preference to the markup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜