hi,
my problem is that i have created contact form in this i filled all my fields sends it to the others email address, the mail is recieved by the person but the senders name is not displaying in the reciptent's mail so here is code i have used it plz have a look an give the possible solution.
code is:
[php]
<?php
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$friendname = trim($_POST['friendname']);
$friendemail = trim($_POST['friendemail']);
$message = trim($_POST['msg']);
$mail_to= $friendemail;
$mail_from= $email;
$mail_sub= "Paul Taylor Dance Company";
$mail_mesg = $message;
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "/r/n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "/r/n";
// Additional headers
//$headers .= 'To: '.$friendname.' '.$friendemail . "\r\n";
$headers .= 'From: '.$name.' '.$email . "/r/n";
$headers .= 'Reply-To: '.$name.' '.$email . "/r/n";
mail($mail_to,$ mail_sub,$mail_ mesg,$headers);
?>
[/php]
my problem is that i have created contact form in this i filled all my fields sends it to the others email address, the mail is recieved by the person but the senders name is not displaying in the reciptent's mail so here is code i have used it plz have a look an give the possible solution.
code is:
[php]
<?php
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$friendname = trim($_POST['friendname']);
$friendemail = trim($_POST['friendemail']);
$message = trim($_POST['msg']);
$mail_to= $friendemail;
$mail_from= $email;
$mail_sub= "Paul Taylor Dance Company";
$mail_mesg = $message;
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "/r/n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "/r/n";
// Additional headers
//$headers .= 'To: '.$friendname.' '.$friendemail . "\r\n";
$headers .= 'From: '.$name.' '.$email . "/r/n";
$headers .= 'Reply-To: '.$name.' '.$email . "/r/n";
mail($mail_to,$ mail_sub,$mail_ mesg,$headers);
?>
[/php]
Comment