Hi, I've been having trouble with a form script that sends an e-mail but doesn't format the information correctly:
$formcontent="VISITOR NAME: $name\\n\\nFEEDBACK: $message";
$recipient = "facadmin@frontandcover.com";
$subject = "Contact Form";
$mailheader = "From: $email\\r\\n";
$mailheader .= "Reply-To: $email\\r\\n";
$mailheader .= "MIME-Version: 1.0\\r\\n";
if(strlen($message)>0){
mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!");
echo "Your Message was Sent, <a href='index.php'><--Back</a>";
} else { echo "No E-mail was sent because your message contained no content. <a href='index.php'><--Back</a>"; }
For instance, if I enter my name as FrontAndCover.com, from e-mail qwerty@frontandcover.com with the content "Hello this is my message" I get an e-mail that looks like this:
From: qwerty@frontandcover.com\r\nReply-To:qwerty@frontandcover.com\r\nMIME-Version: 1.0\r\n
To: recipient-addr@frontandcover.com
Subject: Contact Form
Message Body:
VISITOR NAME:
FrontAndCover.com\n\nFEEDBACK: Hello this is my message
So I'm trying to figure out how to get this to send a normal looking e-mail.