I've spent a couple of days on this and I'm to the "bang-my-head
'gainst the monitor and babble in tongues" mode.
First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10
I have sendmail running on the local server - mail from unix (1) mail
and mutt work locally on the server. This is, specifically, sending
mail to a localhost user or another user off on the net somewhere
works fine.
When I try either simple, or complex, mail() functionality via PHP, it
silently fails. And, by silently, I mean that there are no error
messages in the PHP log (logging of all messages is enabled), sendmail
log, or /var/log/messages or /var/log/warnings. The mail() returns a
FALSE indicating that the php->sendmail handoff never occurs. I've
even tried forcing the return address but that's not working either.
Stable applications, like OSCommerce for example, also fail under this
configuration.
/etc/php.ini is correctly configured and the sendmail_path is defined
correctly. As a matter of fact, the results are the same whether or
not sendmail_path is implicitly or explicitly configured. Currently:
; For Unix only. You may supply arguments as well (default: "sendmail
-t -i").
sendmail_path = '/usr/sbin/sendmail -t -i'
....
safe_mode = Off
I've tried mutltiple sendmail configurations but this was a waste of
time for the reason that sendmail is never seeing the email handoff
from php.
This was working under my 9.2 install - but w/the upgrade to 9.3, it is
failing again. I say "again" because when I upgraded to 9.2 from 9.1,
it failed and my mature-memory(tm) has prevented me from recalling what
exactly I did to address the issue.
Google'ing has turned up a lot of ideas, but no solution and it would
appear that I'm not the only one suffering with this problem.
Thanks in advance...I need this functionality in OSCommerce, but I
figure that, whatever is causing the little dink scripts to fail, is
also causing the big-bore scripts to fail. Figure out what's causing
the little guy to barf on his shoes and I should have the solution,
right?
--Mike
example (failing) code using mail():
$msg = "whatever\n ";
$msg .= "Sender's Name:
$sender\n";
$msg .= "Sender eMail:
$email\n";
$msg .= "Message:
$message\n\n";
$to = "mike@shallop.c om";
$subject = "shallop.co m
feedback email";
$mailheaders = "From:
Shallop.com Website\n";
$mailheaders .= "Reply-To:
$email\n\n";
$ret =
mail($to,$subje ct,$msg,$mailhe aders);
echo "mail() returned: " .
($ret? "TRUE" : "FALSE");
--> always returns FALSE
--> in debugging, I successfully return (display) all variables used in
mail():
mail() returned: FALSE
To: mike@shallop.co m
Subject: shallop.com feedback email
Msg: eMail Successfully Sent - Thank you! Sender's Name: mike Sender
eMail: foo@bar.com Message: test for displaying form vars.
Headers: From: Shallop.com Website Reply-To: foo@bar.com
'gainst the monitor and babble in tongues" mode.
First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10
I have sendmail running on the local server - mail from unix (1) mail
and mutt work locally on the server. This is, specifically, sending
mail to a localhost user or another user off on the net somewhere
works fine.
When I try either simple, or complex, mail() functionality via PHP, it
silently fails. And, by silently, I mean that there are no error
messages in the PHP log (logging of all messages is enabled), sendmail
log, or /var/log/messages or /var/log/warnings. The mail() returns a
FALSE indicating that the php->sendmail handoff never occurs. I've
even tried forcing the return address but that's not working either.
Stable applications, like OSCommerce for example, also fail under this
configuration.
/etc/php.ini is correctly configured and the sendmail_path is defined
correctly. As a matter of fact, the results are the same whether or
not sendmail_path is implicitly or explicitly configured. Currently:
; For Unix only. You may supply arguments as well (default: "sendmail
-t -i").
sendmail_path = '/usr/sbin/sendmail -t -i'
....
safe_mode = Off
I've tried mutltiple sendmail configurations but this was a waste of
time for the reason that sendmail is never seeing the email handoff
from php.
This was working under my 9.2 install - but w/the upgrade to 9.3, it is
failing again. I say "again" because when I upgraded to 9.2 from 9.1,
it failed and my mature-memory(tm) has prevented me from recalling what
exactly I did to address the issue.
Google'ing has turned up a lot of ideas, but no solution and it would
appear that I'm not the only one suffering with this problem.
Thanks in advance...I need this functionality in OSCommerce, but I
figure that, whatever is causing the little dink scripts to fail, is
also causing the big-bore scripts to fail. Figure out what's causing
the little guy to barf on his shoes and I should have the solution,
right?
--Mike
example (failing) code using mail():
$msg = "whatever\n ";
$msg .= "Sender's Name:
$sender\n";
$msg .= "Sender eMail:
$email\n";
$msg .= "Message:
$message\n\n";
$to = "mike@shallop.c om";
$subject = "shallop.co m
feedback email";
$mailheaders = "From:
Shallop.com Website\n";
$mailheaders .= "Reply-To:
$email\n\n";
$ret =
mail($to,$subje ct,$msg,$mailhe aders);
echo "mail() returned: " .
($ret? "TRUE" : "FALSE");
--> always returns FALSE
--> in debugging, I successfully return (display) all variables used in
mail():
mail() returned: FALSE
To: mike@shallop.co m
Subject: shallop.com feedback email
Msg: eMail Successfully Sent - Thank you! Sender's Name: mike Sender
eMail: foo@bar.com Message: test for displaying form vars.
Headers: From: Shallop.com Website Reply-To: foo@bar.com
Comment