Pear mail not working

software development

#1

Hello,

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"
error.

Here’s my code:

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

$recipients = ‘blah@yahoo.com’;

$headers[‘From’] = '‘blah@yahoo.com’;
$headers[‘To’] = '‘blah@yahoo.com’;
$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.