Thanks to Joel and B Esa for the advice.
sendmail's path wasn't set in my php.ini file before. Dunno how php found
sendmail but it did. Still, makes sense to set it explicitly, so I tried
that and tried simplifying the test script.
Now I see this in the apache error log every time I try the test mail
script:
'Program mode requires special privileges, e.g., root or TrustedUser'
Is this suggesting that apache's user has to be made a trusted user in
sendmail.cf? Somehow that doesn't sound like a good idea, but I don't know
enough about sendmail security to really know one way or another.
--Eric Crump