Page 1 of 1

PHP And HTML Emails And Exclamation Marks

Posted: Sun Jan 18, 2004 6:38 pm
by microthick
Problem: I have a script that creates a rather lengthy html email and sends it.

It had a problem in that the person who received the email would see ! marks littering the email, sometimes looking like misspelled words and other times within the html itself so that the "look" of the email was changed.

It would look like:

<span style="font-family: Aria! l, sans-serif;">Something</span>


Cause: This was caused by having NO line breaks within my $mailbody. Apparently, without line breaks, the mail server will just inject ! and a space whenever the max characters without a line break had been reached. This would be somewhere around 200 characters, or so.

Resolution: By adding \n at regular intervals in the html email, the problem was fixed.

I believe the php function wordwrap() can also be used to fix this problem.

Posted: Sun Jan 18, 2004 8:13 pm
by Gen-ik
Yeah, I think the max line length for emails is around 75 characters long... or there abouts.