Wednesday, 14 August 2013

contact form showing my host address. when i got message

contact form showing my host address. when i got message

hello i have using a contact form when i get any mail from my client i saw
my host name showing in mail from. like when i saw saw before open my mail
there showing name who send and from where i saw there showing my host
name geologicsdz@host.dramaclassesonline.com. but in mail everything ok.
so i like to change host name where must be show from his email address
$post = (!empty($_POST)) ? true : false;
$replyto='my@email.com';
if($post)
{
$name = stripslashes($_POST['name']);
$email = trim($_POST['email']);
$business = stripslashes($_POST['business']);
$comments = stripslashes($_POST['comments']);
$phone = stripslashes($_POST['phone']);
$howhear = stripslashes($_POST['howhear']);
$to=$toemail.','.$replyto;
$error = '';
$headers="";
$headers.="Reply-to:$replyto\n";
$headers .= "From: $email\n";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers;
if(!$error)
{
$messages="<h2>From: $name has contacted Geological Solutions</h2>";
$messages.="<h4>Name: $name </h4>";
$messages.="<h4>Email: $email </h4>";
$messages.="<h4>Phone: $phone </h4>";
$messages.="<h4>How did you hear about us?: $howhear </h4>";
$messages.="<h4> Comments: $comments </h4>";
$mail = mail($to,$name,$messages,$headers);

No comments:

Post a Comment