I am using the PHP mail() function for a mail form. But the return address is wrong - I am trying to get it so I can simply "reply" to the address from the query, but my email client is displaying it as the CGI-mailer from my host server.... help
mail("[email protected]",
$_POST['subject'], $_POST['message'],
"From : " . $_POST['email'] .
"\r\nReply-to: ". $_POST['email'] .
"\r\nReturn-path: ". $_POST['email']);
oh, and the header information seems to be written into the email body itself.maybe case sensitive?
Reply-To
maybe remove the space between From and :$to = <!-- e --><a href="mailto:'[email protected]">'[email protected]</a><!-- e -->';
$message = $_POST["message"];
$from = $_POST["email"];
$subject = $_POST["subject"];
$headers = '';
$headers .= "From: <".$from.">\r\n";
$headers .= "Reply-To: <".$from.">\r\n";
$headers .= "Subject:".$subject."\r\n";
mail($to,$subject,$message,$headers);
basically just a re-write of your code...but give it a shot,tis quite a strange problem...fixed it - i think it was the <> delimiters that I had missed.
mail("[email protected]",
$_POST['subject'], $_POST['message'],
"From : " . $_POST['email'] .
"\r\nReply-to: ". $_POST['email'] .
"\r\nReturn-path: ". $_POST['email']);
oh, and the header information seems to be written into the email body itself.maybe case sensitive?
Reply-To
maybe remove the space between From and :$to = <!-- e --><a href="mailto:'[email protected]">'[email protected]</a><!-- e -->';
$message = $_POST["message"];
$from = $_POST["email"];
$subject = $_POST["subject"];
$headers = '';
$headers .= "From: <".$from.">\r\n";
$headers .= "Reply-To: <".$from.">\r\n";
$headers .= "Subject:".$subject."\r\n";
mail($to,$subject,$message,$headers);
basically just a re-write of your code...but give it a shot,tis quite a strange problem...fixed it - i think it was the <> delimiters that I had missed.