Jump to content

Help - PHP mail "Reply-To" does not work, always replies back to recipient.


insomnomaniac

Recommended Posts

Hi All,

 

I'm having trouble with an email I'm trying to send out. While testing my code, the email that my script sends has the "Reply-To" email address in the headers but when I click "reply", the recipient's email, $to in the code below, is inserted instead of the "Reply-To" email. Am I missing anything? Thanks for the help in advance!

 

$to = "[email protected]";
$headers = "From: " .$admin_name. "<" .$admin_email. ">\r\n";
$headers .= "Reply-To: " .$host_name. "<" .$host_email. ">\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "<br>";
$subject = "Subject";
$body = "Body";
mail($to, $subject, $body, $headers);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.