Simple form, adding reply-to

I made a simple form, but I want to add something: I want the person who sends the email (from) to receive an email back with a standard answer.

Can anybody help?

if(!$error) {
$to="my-email-address";
$from=  $email . "\n";		
$subject = "Sinterklaas, u heeft mail!!";
$feedback = "Brief van: ". $name . "\n";
$feedback .= "\nInhoud: ". $message . "\n";
$headers = "MIME-Version: 1.0";
$headers .= "Content-type:text/html;charset=UTF-8";
mail ($to,$subject, $feedback, $headers, "-f".$from );
$success = true;
}

Just call the mail() function again with $from in place of $to and with the appropriate subject, message and headers.

1 Like

Thank you! Works fine!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.