ID: 13044 Comment by: ryan dot morrow at gmail dot com Reported By: michalprv at poland dot com Status: No Feedback Bug Type: Mail related Operating System: linux PHP Version: 4.0.6 New Comment:
I was having a similar problem sending the Content-Type: text/html through the php mail() function. Extra spaces were being inserted almost randomly. If I added text, the space would move down the number of spaces I added. I was pulling the HTML from a database, and everything was inserted on a single line. Inserting newlines corrected the problem. Previous Comments: ------------------------------------------------------------------------ [2008-03-18 11:28:31] michael dot reiter at univr dot it I had several links in my HTML email. The effect described above could be resolved by adding the target attribute to the link. Note that exactly the same HTML would be correct and would bring no error within browsers. This effect only applies to HTML emails sent with the PHP mail() function. <a href="url">text</a> in some emails causes the characters <p> to be inserted at the end of paragraphs or spaces to be inserted within words (splitting them up) in the subsequent html <a href="url" target="_self">text</a> (also target="_blank" or whatever) does not bring this effect ------------------------------------------------------------------------ [2008-03-18 09:04:57] michael dot reiter at univr dot it I have this problem with PHP 5.2.5. Seems that when the message exceeds a certain length it adds strange characters (</p> in the message, splits a word with a space character, ...) ------------------------------------------------------------------------ [2007-08-14 19:14:44] kinadian at cogeco dot ca I ran into this same problem. I was able to fix it by adding in newline characters. From what I can determine, it is caused by too many characters on one line. In my case, I was sending an HTML e-mail and I didn't bother with newlines because I was using HTML formatting. By adding newline characters (I added them where I would if I were creating a nicely formated HTML webpage) I was able to avoid this bug. I hope this helps you guys too. ------------------------------------------------------------------------ [2007-07-30 17:46:12] brieb at kreotek dot com I am using a standard Ubuntu 6.06 Dapper Drake installation (PHP 5.1.2, Postfix ,and Apache 2.0.55 (unbutu)) and am having similar problems. extra characters are are very consistent, and all emails with too-long lines are getting that "!/n" characters put in. ------------------------------------------------------------------------ [2005-04-22 08:46:21] wehaveagig at hotmail dot com I'm a web developer and I've been experiencing a very similar problem. Infact, it almost identical to the problem reported in Bug #31496 (I would have added my comment there, but I couldn't do so because it was listed as "Bogus"). But in my case, the problem is INTERMITTENT, where the garbage exclamation point character ! will appear in different places in a given message. (If it occurs at all). Sometimes the messages will be prefectly fine. Other times, I'll get an exclamation point somewhere in the body of the message. And other times, there will be several exclamation points in a given message. I strongly suspected the Zend Optimizer causing these bugs, as it tries to look ahead, it may be invoking the mail/sendmail program inproperly or before the message has finished being fully formed. Please respond with any opinions on that theory. Thanks Steve ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/13044 -- Edit this bug report at http://bugs.php.net/?id=13044&edit=1