pear mail error
am 20.09.2007 01:33:52 von berkshire
I installed the Pear mail package and then created a quick script
using the example from http://pear.php.net/manual/en/package.mail.mail.send.php
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.
TIA
Re: pear mail error
am 20.09.2007 11:47:13 von gosha bine
On 20.09.2007 01:33 berkshire@gmail.com wrote:
> I installed the Pear mail package and then created a quick script
> using the example from http://pear.php.net/manual/en/package.mail.mail.send.php
>
> 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.
>
> TIA
>
You may want to show us the lines 1-17 of your testmail.php.
--
gosha bine
makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi
Re: pear mail error
am 20.09.2007 14:51:55 von berkshire
> You may want to show us the lines 1-17 of your testmail.php.
>
> --
> gosha bine
Here it is (it's the same code as found on the example at
http://pear.php.net/manual/en/package.mail.mail.send.php:
include('Mail.php');
$recipients = 'jim@example.com';
$headers['From'] = 'richard@example.com';
$headers['To'] = 'john@example.com';
$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
am 20.09.2007 16:18:36 von berkshire
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.