Body email comes back all on one line

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am using a simple contact form and the email received comes back with body all
on one
line. It used to come back with each field per line.

$to = ""; // E-mail address to send mail to.
$subject = ""; //Subject of the e-mail
$message = "

Name: $your_name
Email address: $your_email
Question: $q

IP Address: " . $_SERVERREMOTE_ADDR . " Browser: " . $_SERVERHTTP_USER_AGENT . "
"; // Message shown at other end (the e-mail).
mail($to, $subject, stripslashes($message), "From: $your_name
PHP/" . phpversion());
header( "location: " ); //url to re-direct to after mail has been succesfully


Thanks in advance!

Re: Body email comes back all on one line

The Apprentice wrote:
Quoted text here. Click to load it

Add newline characters (\n) where you want newlines.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline