Hi,
I have been having problems with my new server with regard to sendmail and php.
Sendmail is running. Ownership is root:sys with rwxr-xr-x as perms.
PHP is installed as NSAPI. Install directory owner root:sys.
When I use sendmail from command line logged in as root, the mail goes without a problem.
However, when I try using a php script to send the mail, even something like:
<?php
$yes = mail("<my email address>", "Test mail from webserver", "Hey it's Monday");
if (! $yes == true )
{
echo("Mail failed!");
}
?>
the following error message is given:
Warning: mail(): Could not execute mail delivery program in /local/Netscape/iplanet/www6.0sp4/docs/test/email/testmail.php on line 2
Mail failed!
This looks like a permissions issue to me although I reckon the permissions are set correctly. I've been trawling forums, google and even emailed a couple of mates but still getting nowhere.
Just looked at mail log and here's an extract:
Nov 3 12 29 43 <My FQDN sendmail[12378] [ID 801593 mail.info] hA3CThl12378 from=<My from address>, size=82, class=0, nrcpts=1, msgid=<200311031229.hA3CThl12378@<My FQDN>>, relay=nobody@localhost
Nov 3 12 29 44 <My FQDN> sendmail[12380] [ID 801593 mail.info] hA3CThl12378 to=<Valid To address>, delay=00 0 01, xdelay=00 0 01, mailer=esmtp, pri=120082, relay=mail9.messagelabs.com. [194.205.110.133], dsn=2.0.0, stat=Sent (ok 1067862405 qp 13978)
And for an unsuccessful mailing:
Nov 3 12 55 42 <My FQDN> sendmail[15111] [ID 801593 mail.info] hA3Ctga15111 Authentication-Warning <My FQDN> nobody set sender to =<My From address> using -f
Nov 3 12 55 42 <My FQDN> sendmail[15111] [ID 801593 mail.info] hA3Ctga15111 from=<My From address>, size=18, class=0, nrcpts=0, msgid=<200311031255.hA3Ctga15111@<My FQDN>>, relay=nobody@localhost
And finally here's an extract from my php.ini:
sendmail_from me@localhost.com
sendmail_path /usr/lib/sendmail -t -i -f <My From address>
SMTP localhost
smtp_port 25
Hope this helps you to help me,
Duncan