This is driving me crazy...

$sendit = (`ls`);
echo $sendit;

The above chunk of code returns a directory listing on my php page just fine. However...

$sendit = (`sendmail`);
echo $sendit;

This seems to do nothing. I am looking for a time stamped sendmail entry in /var/log/mail.log but see NOTHING! When I 'sendmail' (no arguments) from the command line I at least get an entry in /var/log/mail.log reflecting the time I ran the command. Why would php not at least send the command and create the entry?

I have also tried system(), exec(), etc.

I figured this out...not supplying the full path to sendmail was my downfall.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.