Chris a écrit :

Try this:
<?
$email = "[EMAIL PROTECTED]";
$headers  = "From: ".$email."\r\n";
$headers .= "X-Mailer: PHP/".phpversion()."\r\n";
if(mail("[EMAIL PROTECTED]","essai","test",$headers)) {
   echo "OK: ".ini_get('sendmail_path');
} else {
   echo "NOK: ".ini_get('sendmail_path');
}
?>

   Note

Same result : "NOK /usr/lib/sendmail -t -i"
I think the problem is not in the test script.



Is that the right path? Normally it's /usr/sbin/sendmail not /usr/lib .

Yes, /usr/sbin/sendmail is a link to /usr/lib/sendmail.

I've made tests and with the php binary (php -f myscript.php), the mail is send.
It only doesn't work with the apache module (libphp5.so)...

So, it confirms that the script and the PHP configuration (php.ini) are OK.

If you have any solutions...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to