line breaks
Posted: Thu Mar 10, 2011 2:24 pm
I am having issues sending mail and changing the line breaks to breaks. I am sending an html email and the line breaks in the mail itself, when received, have \r\n and I have tried using nl2br() but I still get the same result:
Result: test13\r\n\r\ntest13\r\n\r\ntest13
Result: test13\r\n\r\ntest13\r\n\r\ntest13
Code: Select all
<p id='message'>" . nl2br($_REQUEST['message']) . "</p>
<p id='headers'>
From: " . $name . "<br />
Subject: " . nl2br($_REQUEST['subject']) . "<br />
...
//Mail it
if(mail($to, $subject, $message, $headers)){