Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Email auto reply Re: Email auto reply

#96912
bungle
Member

Once you have validated the form and stored the results you would call mail()

Assuming your have already taken the users $_POST variable, validated it and stored it as $email further up the script then ….


$to = $email;
$subject = 'Form submission at www.yoursite.com';
$message = 'This is an auto generated response from www.yoursite.comrnrnThank you for your submission.rn';
$headers = 'From: [email protected]' . "rn" .
'Reply-To: [email protected]';

mail($to, $subject, $message, $headers);
?>