I am trying to write a very simple email form script to send emails to me from my website so that my customers can submit questions about their orders. Anyway, This script works just fine for what I need except when the email is finally received the content is printed and then about 2 lines under it there is a "." that I don't know where comes from.
Any thoughts?
<?php
if(isset($_POST['submit']))
{
$name = $_POST['fname'] . " " . $_POST['lname'];
$company = $_POST['company'];
$email = $_POST['email'];
$to = "Contact <test@domain.com>";
$type = $_POST['type'];
$message = "Name: $name\r\n";
$message .="Email: $email\r\n\r\n";
$message .="Company: $company\r\n\r\n";
$message .="Message: \r\n" . $_POST['message'];
$headers = "From: $name <$email>";
$mail = mail($to, "Customer Inquiry: " . $type, $message, $headers);
if($mail)
{
echo "Thank you for your question. We will reply to you shortly.<br /><br />";
}
else
{
echo "There was an error while processing your message. Please try again.<br /><br />";
}
}
?>
Email Output:
Name: Eric Thivierge
Email: me@domain.com
Company: Stolen Studios
Message:
Test
[highlight].[/highlight] <- This being the problem
Thanks,
Eric T