From:             uroeder at gmx dot net
Operating system: Linux
PHP version:      4.3.1
PHP Bug Type:     Mail related
Bug description:  mail-function uses only \n to seperate fields To & Subject

The php-Manual suggests "... You must use \r\n to seperate headers, ...",
but when you take a look at ext/standard/mail.c the To- and Subject-field
given as arguments to the php-mail-function are seperated by using ONLY
newline (\n). Maybe sendmail corrects this mistake automatically, but I'm
using postfix and when I try to send mail some of my additional headers
(which are all correctly seperated by \r\n) appear in the message-body.
Fixing this bug is easy, just edit ext/standard/mail.c lines 199-204
(fprintf(sendmail, ...)) and replace \n with \r\n.

-- 
Edit bug report at http://bugs.php.net/?id=22962&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22962&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22962&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22962&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22962&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22962&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22962&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22962&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22962&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22962&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22962&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22962&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22962&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22962&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22962&r=gnused

Reply via email to