#41732 [NEW]: Bare LFs in SMTP

From: Date: Mon, 18 Jun 2007 20:32:03 +0000
Subject: #41732 [NEW]: Bare LFs in SMTP
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113911@lists.php.net to get a copy of this message
From: as at as dot hu Operating system: Windows 2003 PHP version: 4.4.7 PHP Bug Type: Mail related Bug description: Bare LFs in SMTP Description: ------------ On Windows 2003, default smtp server. When I use the mail function, some target e-mail system say: 195.56.151.XX, OutboundConnectionResponse, 2007. 06. 18., 22:06:43, SMTPSVC1, AS, -, 312, 0, 47, 0, 0, -, -, 451 See http://pobox.com/~djb/docs/smtplf.html., Reproduce code: --------------- $subject = "Elveszett jelszó"; $headers = "From: ".$mail_pswd_from."\nX-FW-MailID:s6s06s9s80"; $row=mysql_fetch_array($result); $to = $row['usr_email']; $body = "Tisztelt ".$row[usr_lastname]." ".$row[usr_firstname]."!\nAz Ön jelszava: ".$row[usr_pswd]."\n\nÜdvözlettel,\nA S"; mail($to,$subject,$body,$headers); Expected result: ---------------- The email bounce to the sender from some hosts. (like citromail.hu, vipmail.hu) with this error message: http://pobox.com/~djb/docs/smtplf.html Actual result: -------------- When I replace all newline to CRLF, the mail went away without problem: $subject = "Elveszett jelszó"; $headers = "From: ".$mail_pswd_from."\nX-FW-MailID:s6s06s9s80"; $row=mysql_fetch_array($result); $to = $row['usr_email']; $body = "Tisztelt ".$row[usr_lastname]." ".$row[usr_firstname]."!\nAz Ön jelszava: ".$row[usr_pswd]."\n\nÜdvözlettel,\nA S"; $body = str_replace("\r\n","\n",$body); $body = str_replace("\r","\n",$body); $body = str_replace("\n","\r\n",$body); mail($to,$subject,$body,$headers); -- Edit bug report at http://bugs.php.net/?id=41732&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41732&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41732&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41732&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41732&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41732&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41732&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41732&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41732&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41732&r=support Expected behavior: http://bugs.php.net/fix.php?id=41732&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41732&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41732&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41732&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41732&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41732&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41732&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41732&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41732&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41732&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41732&r=mysqlcfg

« previous php.bugs (#113911) next »