PHP function mail() is not working
Below is a part of code from the test script:---
$mt = $_POST['mt']; // address
$txt = $_POST['txt']; // message body
$u = system("whoami", $ret_val);
$h = system("hostname", $ret_val);
$sFrom = "From: no-reply@domain.com";
if (mail($mt, "Mail from tm.php: $u" . "@" . $h, $txt, $sFrom))
echo "Mail has been sent to $mt<br>";
else echo "someting wrong.. mail hasn't been sent..<br>";
I did a test, no errors, no message received, nothing in mail queue. "Prevent user nobody.." is disabled as well. The client claims it was working fine for a few days after I disabled "prevent user nobody" until today it stopped working. Strangely, no changes have been made to the server since then otherwise.
All these are enabled (and have been the whole time)
Always set the Sender: header when the sender is changed from the actual sender.
Verify the existance of email senders.
Use callouts to verify the existance of email senders.
Discard emails for users who have exceeded their quota
Using php 4.4.1 as well