pear mail error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I installed the Pear mail package and then created a quick script
using the example from

I getting the following error:
Fatal error: Call to undefined method PEAR_Error::send() in /var/www/
html/site/htdocs/testmail.php on line 17

Anyone know why this is happening?  The object is successfully created
and the send() method is included in the class that successfully
created the object, so I don't understand how this is even possible.


Re: pear mail error

On 20.09.2007 01:33 wrote:
Quoted text here. Click to load it

You may want to show us the lines 1-17 of your testmail.php.

gosha bine

makrell ~
php done right ;)

Re: pear mail error

Quoted text here. Click to load it

Here it is (it's the same code as found on the example at :


$recipients = '';

$headers['From']    = '';
$headers['To']      = '';
$headers['Subject'] = 'Test message';

$body = 'Test message';

$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);

Re: pear mail error

I figured out the problem.  The pear package installed did not include
permissions that allowed php to access the pear files.  This is very
strange and should not happen on a package install and, as of yet, I
don't know what caused it.

Site Timeline