views:

29

answers:

1

Though i have set the from address in header it again shows my server info as from address.

[email protected]

What is a possible solution? Here is my code

<?php 
//Requests
$name= $_REQUEST["name"]; 
$email= $_REQUEST["email"]; 
$phone = $_REQUEST["phone"]; 
$msg= $_REQUEST["message"]; 
//$to
$to = '[email protected]';
// The message
$message = $name . " has submitted a new message at your site:<br/><br/><b>Message:</b><br/>". $msg ."<br/><b>Phone No: </b>". $phone . "<br/><b>Email:</b> " . $email;

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
//headers
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
// Send
mail($to, 'Message Posted at Website!', $message, $headers);
?>
A: 

Its seems to be a problem with my host.

esafwan