pear mail error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • berkshire@gmail.com

    pear mail error

    I installed the Pear mail package and then created a quick script
    using the example from http://pear.php.net/manual/en/packag....mail.send.php

    I getting the following error:
    Fatal error: Call to undefined method PEAR_Error::sen d() 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

  • gosha bine

    #2
    Re: pear mail error

    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/packag....mail.send.php
    >
    I getting the following error:
    Fatal error: Call to undefined method PEAR_Error::sen d() 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

    Comment

    • berkshire@gmail.com

      #3
      Re: pear mail error

      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


      <?php
      include('Mail.p hp');

      $recipients = 'jim@example.co m';

      $headers['From'] = 'richard@exampl e.com';
      $headers['To'] = 'john@example.c om';
      $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($recipien ts, $headers, $body);
      ?>

      Comment

      • berkshire@gmail.com

        #4
        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.


        Comment

        Working...