Error using PEAR mail fuction.

This is a discussion on Error using PEAR mail fuction. within the PHP Language forums, part of the PHP Programming Forums category; Call to undefined method PEAR_Error::send() Here are the lines of code in the php file: $params['sendmail_path'] = '/usr/lib/...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-10-2008
techjohnny@gmail.com
 
Posts: n/a
Default Error using PEAR mail fuction.

Call to undefined method PEAR_Error::send()

Here are the lines of code in the php file:

$params['sendmail_path'] = '/usr/lib/sendmail';
$mail_object =& Mail::factory('sendmail', $params);
$mail_object->send($recipients, $headers, $message);
Reply With Quote
  #2 (permalink)  
Old 03-10-2008
Rik Wasmus
 
Posts: n/a
Default Re: Error using PEAR mail fuction.

On Mon, 10 Mar 2008 05:13:27 +0100, techjohnny@gmail.com
<techjohnny@gmail.com> wrote:

> Call to undefined method PEAR_Error::send()
>
> Here are the lines of code in the php file:
>
> $params['sendmail_path'] = '/usr/lib/sendmail';


Sure about that?

> $mail_object =& Mail::factory('sendmail', $params);


if (PEAR::isError($mail_object)){echo $mail_object->getMessage();}
else {$mail_object->send($recipients, $headers, $message);}
--
Rik Wasmus
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:32 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0