I have a text box in my contact form with php mail function. In php mail, I set the header to html.
But even if the user is of type type
Line1....
Line2....
I get mail like this.
Line1....Line2....
What could be the reason?
Update: The
text area is simple.
<textarea id ="msg" name="message" cols="" rows="5" class="msg">Message</textarea>
Sent to this script with jquery ajax function
<?php
$sub = "Message Posted";
$email = "some@somewhere.com";
$message = "<b>Message :</b><br/>" . $_REQUEST["msg"];
$message = wordwrap($message, 70);
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: ifthi@ifthi.com' . "\r\n" .
'Reply-To: '. $_REQUEST["email"] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $sub, $message,$headers);
?>
But when you receive an email, everyone is on the same line. Even if you write in 2 lines and send.
source
share