Help!
I've created a very simple script that won't send for some reason:

<?
$email = "equick-laughlin@rrpartners.com";
print "";
print "<BODY>";
print "<B>mailtest</B> php program completed. Mail sent to $email.";
mail("$email", "test from the mailtest program on ns3", "Line 1\nLine 2\nLine 3"
);
print "</BODY>";
?>

I've tested my sendmail program and can send something from command line, so I know it's working.

Others have asked me to check the php.ini file, so I've been hacking away at that for some time now. I can't even get the error logging to work correctly.

Yet I know php is working - I'm running a help desk program called Keystone just fine from it.

So somewhere between my script and sendmail, there's a failure. How do I hunt it down? Has anyone ran into this before?

    4 months later

    Hmmm...incidentally I don't know the answer to your query, however I would like to have another look at this so-called "sendmail" program you speak of...yes.

    Where'd you get it homes?

      25 days later

      sendmail is a standard *nix install.

        17 days later

        Your call to sendmail from php is incorrect. It should be:

        mail($mailTo,$mailSubject,$mailBody,
        $mailHeaders);

        It looks like you forgot the body.

        Also, your sendmail directive in php.ini should probably be 'sendmail -t'.

        Hope this helps.

          Write a Reply...