php email problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Allan R. Batteiger

    #1

    php email problems

    Greetings
    This script file ran till I had a HD crash and had to rebuild my
    server. Unfurtunately I had everything backed up but some files from
    /etc.
    this is a simpel formtoemail script that come with webforms.
    if I run the script from a shell it sends the email
    if I run it from a www page I do not get an email.

    this is the current printout I get if the mail does not send.
    mail returned FalseThe following was sent on 22/02/07(Thu) @ 15:41
    --------------------------------------------------------- submitBtn:
    Submit name: Allan R. Batteiger address: 3413 Crescent Ct city: Plano
    state: TX zip: 75093 phone: 469-366-9892 email: arb@rtsi.com comments:
    License_Class: Radio MB Only Scout_Info: Scout leader Troop_Number: T2819
    Notice: Undefined variable: php_errormsg in
    /home/WB5QNG/public_html/RMBformtoemail. php on line 67

    I am attempting to find out why the mail() funtion did not work.
    my sinppet of code looks like this:
    error_reporting (E_ALL);
    // send the email
    if(mail($your_e mail, $subject, $message, "From: $name <$email>"))
    { // go to return URL
    if (isset($thankyo u)) {
    header("Locatio n: $thankyou");
    exit();
    }
    }
    else
    {
    echo " mail returned False";
    echo $message;
    echo $php_errormsg;
    exit();
    }

    I am not a php programmer and I have spent the last couple fo days trying
    to figure out how to get any possible error messages from this script to
    enlighten me as to where the problem may be. Any help would be greatly
    appreciated.
    System is Linux FC6 / Apache / PHP / CommuniGate Pro ( email server)

    Thanks
    Allan
  • Rik

    #2
    Re: php email problems

    Allan R. Batteiger <arb@rtsi.comwr ote:
    Notice: Undefined variable: php_errormsg in
    /home/WB5QNG/public_html/RMBformtoemail. php on line 67
    I am not a php programmer and I have spent the last couple fo days trying
    to figure out how to get any possible error messages from this script to
    enlighten me as to where the problem may be. Any help would be greatly
    appreciated.
    <http://nl3.php.net/manual/en/ref.errorfunc.p hp#ini.track-errors>

    ini_set('track_ errors',true);

    Or define it in php.ini/httpd.conf/.htacces
    --
    Rik Wasmus

    Comment

    Working...