I have found what looks to be a problem with the php mail() function
and string in the message body with \n newlines in them.

using the following piece of code to test

<?php

$msg = "Hello\nWorld";
$to = "email address removed";
$subj = "Testing 1 2 3 ...";

$s = mail($to, $subj, $msg);
print "Res: $s";

?>

generates the following output

Warning: Server Error in d:\apache\htdocs\mailtest.php on line 8
Res:

If I change $msg to

$msg = "Hello World";


the message goes through fine and the only output is "Res: 1" as it should
be.

Has anyone else run into this and know a solution, or can atleast verify it.
I've seen it on 2 different windows 2000 machines running the same
versions of php and apache, as well as connecting to 2 different smtp
servers.

Environment
Window 2000
Apache 1.3.27
PHP 4.2.3

Thanks
Don



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to