Forums

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

Home Forums JavaScript Email auto reply

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36696
    Ricardo C.
    Participant

    Hi!
    How would I code an auto reply to a form? In php and or javascript?

    #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);
    ?>

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.