[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Sendmail not sending WAS email app i can use



On 4/24/05, Alexander Dalloz <ad+lists uni-x org> wrote:
> Am So, den 24.04.2005 schrieb jim lawrence um 18:48:
> 
> > > the set enforce 0   didn't make a difference
> > Tried the above still nothing
> >
> > if my php script is executing where are the messages being sent? or logged?
> 
> > Jim Lawrence
> 
> /var/log/maillog is the log file Sendmail is logging into. "mailq -v"
> may show messages queued because of trouble sending them out?
> As SELinux isn't actually what is stopping you, you should make use of
> PHP's error reporting to see where you made faults in scripting.
> 
> Alexander
> 
> --
> Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
> legal statement: http://www.uni-x.org/legal.html
> Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.14_FC2smp
> Serendipity 18:59:41 up 12 days, 15:40, load average: 0.21, 0.30, 0.26
> 
> 
> 
01:09 PM[jim jimsdesktop ~]$ sudo mailq -v
/var/spool/mqueue is empty
                Total requests: 0
01:09 PM[jim jimsdesktop ~]$

The script is a generic one 
************************************************* Start
Script**************************
 <?php

// your email address
$youremail = "myemailaddress";

// field validation, I changed this line, didn't make new variables
here but you could if you wanted (this saves some memory :) )
if (empty($_POST['email']) || empty($_POST['comments']) ||
empty($_POST['name'])){
  print ("All fields are required! Please go back and try again.");
}

else {

//new stuff :)
$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['comments'];
//end new stuff, you can use you own variables now

// email validation
if(!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$',
$email)) {
  print ("Your email address does not appear to be valid. Please go
back and try again.");
  exit;
}

// send email
$headers = "From: \"$name\" <$email>\n";
$subject = "Feedback Form";
$message = "$comments";

mail ("$youremail", "$subject", $message, $headers);
print ("Thank you $name, your email has been sent.");

}
?>
**************************************End
Script****************************************

Anything wrong with this?  
the last line of the script does get executed 
I sent a message with webmin to a online account which works 
I guess i'm lost   
I thought it works like so  

comment form
        |
php script
        |
sendmail 
        |
  my online account


-- 

Jim Lawrence
Registered Linux User: #376813
********************************************************
When I'm feeling down, I like to whistle. 
It makes the neighbor's dog run to the end of his chain and gag himself.
************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]