#39066 [NEW]: Emailing long strings
From: whomba42 at gmail dot com
Operating system: sun 5.1
PHP version: 4.4.4
PHP Bug Type: Mail related
Bug description: Emailing long strings
Description:
------------
PHP truncates obscenly large messages during an email rather than wraps
it. there was 1022 characters on the line, then it truncated it and
discarded all the rest of the code/text. We read text from the DB (MySQL
5 using php my admin)and it echoed out fine, however during the mail, the
last bit of text got cut. After putting a \n in to the message after each
entry and broke up the line it worked fine.
Reproduce code:
---------------
$query="SELECT * FROM opendoor_articles WHERE issue_id='$issueID'";
$result=mysql_query($query);
while($row=mysql_fetch_assoc($result))
{
$message.="<strong>$row[title]</strong>"; $paragraphs=explode('</p>',$row['body']);
$message.=$paragraphs[0];
// this is what we added as the 'fix' $message.="\n\n";
}
$to="$email";
$from="someone@somewhere.com";
$subject="OpenDoor $issueName";
$headers = "From: $from\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=iso-8859-1\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
mail($to, $subject, $message, $headers);
}
Expected result:
----------------
should have echoed out the message with the code recieved from database.
Actual result:
--------------
shows the code up to 1022 characters then dies and goes to the next line.
--
Edit bug report at http://bugs.php.net/?id=39066&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39066&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39066&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39066&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39066&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39066&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39066&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39066&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39066&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39066&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39066&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39066&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39066&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39066&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39066&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39066&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39066&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39066&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39066&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39066&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39066&r=mysqlcfg
Thread (3 messages)
- whomba42 at gmail dot com