Pear mail not working

software development



I’ve tried to email myself with a form using Pear Mail and it did not work … I get a "sendmail [/usr/sbin/sendmail] not executable"

Here’s my code:

require_once ‘/usr/local/lib/php/Mail.php’;

$recipients = ‘’;

$headers[‘From’] = '‘’;
$headers[‘To’] = '‘’;
$headers[‘Subject’] = ‘Test’;

$body = “blah blah blah”;

$params[‘sendmail_path’] = ‘/usr/sbin/sendmail’;

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory(‘sendmail’, $params);
$mail_object->send($recipients, $headers, $body);

I would like to get this email form working with PEAR rather than with the default PHP mail function.