Use this forum to help each other on the Freebies offered at luiszuno.com.
Send Mail - Minor Problem
  • My sendmail.php seems to be missing a few lines of script. This is all I got.


    //vars
    $subject = $_POST['subject'];
    $to = explode(',', $_POST['to'] );

    $from = $_POST['email'];

    //data
    $msg = "NAME: " .$_POST['name'] ."
    \n";
    $msg .= "EMAIL: " .$_POST['email'] ."
    \n";
    $msg .= "WEBSITE: " .$_POST['web'] ."
    \n";
    $msg .= "COMMENTS: " .$_POST['comments'] ."
    \n";

    //Headers
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=UTF-8\r\n";
    $headers .= "From: <".$from. ">" ;


    //send for each mail
    foreach($to as $mail){
    mail($mail, $subject, $msg, $headers);
    }
  • mine is below and it works fine, if this helps please tell me if you get the search box working because i would love to know how.

    <?php<br />/**
    * Author: Luis Zuno
    * Email: luis@luiszuno.com
    * URL: http://www.luiszuno.com
    * Version: 1.0.0
    **/

    //vars
    $subject = $_POST['subject'];
    $to = explode(',', $_POST['to'] );

    $from = $_POST['email'];

    //data
    $msg = "NAME: " .$_POST['name'] ."
    \n";
    $msg .= "EMAIL: " .$_POST['email'] ."
    \n";
    $msg .= "COMMENTS: " .$_POST['comments'] ."
    \n";

    //Headers
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=UTF-8\r\n";
    $headers .= "From: <".$from. ">" ;


    //send for each mail
    foreach($to as $mail){
    mail($mail, $subject, $msg, $headers);
    }

    ?>
  • How do you get mail if your email address isn't included? And, no, I haven't been able to get the search function working.
  • Okay, I was looking in the wrong place. Now that I found the email address options in the HTML file it works fine.