Hi folks,
I'd prefer to post this on a PHP-specific list, but since php4lib is
effectively dead, I thought I'd try here instead:
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?
e.g. (this is all in angle-brackets and quotes, but I don't know if that
would cause trouble in some mail readers, so I leave it out):
$mailTo = "[log in to unmask]";
$mailSubject = "php mail test";
$mailBody = "does this work?";
$mailHeaders = "From: [log in to unmask]";
if( mail($mailTo, $mailSubject, $mailBody, $mailHeaders))
{
print "Mail successfully sent to $mailTo.";
}
else { print "Mail could not be sent to $mailTo."; }
This code, as the sole code on a page, is returning FALSE, so resulting in
the "mail not sent" message, but the mail is going through just fine. Any
ideas how I can get it to work, or where the problem might be? (This code
works properly on the old server under earlier versions of PHP & HP-UX.)
I appreciate any ideas folks might have.
Thanks
Ken
Ken Irwin [log in to unmask]
Reference/Electronic Resources Librarian (937) 327-7594
Thomas Library, Wittenberg University
|