I'm trying to translate posted html form input into an email message. I will explain my problem with the following (test) code:
$body = '';
$body .= 'abc' . "\r\n";
$body .= '1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890' . "\r\n";
$body .= 'abc' . "\r\n";
$headers = "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$success = mail($to, "Posted " . date("m/d/Y"), $body, $headers);
The result is (in Outlook):
abc
1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 abc
The last abc is put directly after the numbers, not taking into account the \r\n. I tried a lot, read numerous forums but could not figure out the problem. Please help.
By the way, I'm using W2000, IIS 5.0, Internet Explorer 6.0, Outlook XP and PHP 4.3.4.