Print

Print


fellow ohiolinker ken ;)

> I'm in the middle of migrating to a new server (HP-UX 11.11 / Apache 2.0.48
> / PHP 4.3.4) and I'm finding that the php mail commands are working, but
> they return FALSE even when mail was sent. Any clue why this might be
> happening?

i bet your sendmail/whatever is acting up....i'd check your mail logs,
and see if its returning some weird error, but not a bad enough error to
kill the mail....here's another description of the problem from the php
user-contributed notes on mail():

---------------------------------------------------------
If you are trying to check whether or not your mail has been sent using
something similar to this:

$result = mail(etc);

and the $result is consistently coming back as FALSE even though the
mail was indeed sent, then it is likely that your mail agent is
returning an error code after sending mail. This is likely due to a
misconfiguration in the agent. I use sendmail, and it was returning an
error about not finding localip.db file every time mail was sent, and
this was confusing mail(). It kept returning FALSE even though the mail
was sent. I corrected the sendmail configuration and then mail() would
return TRUE correctly when mail was sent.

That was ANOTHER problem I thought for sure was a bug for a long time -
when I figured out what it was, I realized it was simply a shortcoming
in mail().
---------------------------------------------------------

hth,
rob