I have the following code
<?php
$to = "my@email.com";
$subject = "email submission from rancone.co.uk";
$content = array ( $title, $name, $surname, $phone, $address, $message );
$val = implode("\n", $content);
$sender_name = "rancone.co.uk - booking submission";
$headers .= "From: \"".addslashes($sender_name)."\" <".$email.">\r\n";
$headers .= "Reply-To: ".$email."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-Mailer: PHP / ".phpversion()."\r\n";
mail( $to, $subject, stripslashes($val), $headers ) or print "Error handling message. message not sent.";
?>
This is for a submission from my website to my e-mail address.
It works fine, except that it all comes out on one line!!!
I have used an array in the $content string and tried to implode it with a preceding line break, but without success!
Any help much appreciated!