By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

php email problems

P: n/a
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: ar*@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_email, $subject, $message, "From: $name <$email>"))
{ // go to return URL
if (isset($thankyou)) {
header("Location: $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
Feb 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Rik
Allan R. Batteiger <ar*@rtsi.comwrote:
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.php#ini.track-errors>

ini_set('track_errors',true);

Or define it in php.ini/httpd.conf/.htacces
--
Rik Wasmus
Feb 23 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.