You get a bonus - 1 coin for daily activity. Now you have 1 coin

A few characters in an email in the wrong encoding - diamond symbols, PHP Mail

Practice



A few characters in an email in the wrong encoding - diamond symbols, PHP Mail
when sending a letter via phpmailer or via mail(), an extra character gets added to the code - an exclamation mark or diamond symbols if UTF8, which corrupts the body of the letter. It's not clear where it comes from.

example хС �

or "!newline_space"

This isn't phpmailer - it's just how mail servers behave. They add hex 21 0D 0A 20.

Exclamation marks get added when the body of the letter doesn't have enough newlines for a while; add more of them into the HTML code and the exclamation mark will disappear.

What helped me

if you're using the phpmailer class
then set line wrapping every 80 characters

phpmailer->wordwap= 80 or something along those lines

See also

  • [[b6841]]
  • [[b11166]]
  • [[b11329]]
  • [[b730]]
  • [[b8929]]
  • [[b11558]]
  • [[b5196]]
  • [[b11273]]
  • [[b6020]]
  • [[b11601]]
  • [[b11276]]
  • [[b11625]]
  • [[b11545]]
  • [[b11659]]
  • [[b11165]]
  • [[b4749]]
  • [[b11845]]
  • [[b6409]]
  • [[b5963]]
  • [[b4379]]

See also

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Computer networks"

Terms: Computer networks