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

Home Forums Back End Sending Form Contents for 2 emails via Formmail.php

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #35454

    Hi , i’m going to create an assessment form for a friend of mine . i designed the form page with all the details (form , names and ids , etc…) . and the form action goes to a PHP File called formmail.php . with is something like this :


    // you can specify which email you want your contact form to be emailed to here

    $toemail = "email";
    $subject = "subject";

    $headers = "MIME-Version: 1.0n"
    ."From: "".$name."" <".$email.">n"
    ."Content-type: text/html; charset=iso-8859-1n";

    $body = "Name: ".$name."
    ."Email: ".$email."
    ."Tel: ".$tel."

    if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$", $email))
    echo "That is not a valid email address. Please return to the"
    ." previous page and try again.";

    mail($toemail, $subject, $body, $headers);
    echo "Thanks, we will be in touch with you soon...";

    in this PHP Code there is value called $toemail which defines which email adress this form will be sent to.
    my question is , is there a way to send the form content to “2” email adresses ?

    thanks for any help.

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.