PHP reply-to error - comes with admin email not sender of contact form

前端 未结 1 1967
既然无缘
既然无缘 2021-01-28 05:45

I have the below PHP contact form that has a CAPTCHA code to ensure is correct. However, when I reply to the email from the website it puts a random email which i believe is the

相关标签:
1条回答
  • 2021-01-28 06:05

    Please replace

    mail($to, $subject, $body);
    

    with your code

       $headers = "From: $mail\r\n"; 
       $headers .= "Reply-To: $mail\r\n";   
    
       mail($to, $subject,$body,$headers); 
    
    0 讨论(0)
提交回复
热议问题