PEAR used inside a function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kevin bailey

    #1

    PEAR used inside a function

    Currently have had to give up on this one!

    How would I use a PEAR class inside a new function?

    I would like to include the mail_queue class inside a function to send out
    emails when the function has been called.

    However, when I try to do this I get the

    Fatal error: Call to a member function on a non-object
    in /usr/share/php/Mail/Queue.php

    error

    Currently I'm going to continue to call the mail_queue from the normal code
    - but would like to know how to get it working from inside a function for
    future reference.

    Thanks,

    Kevin
  • Jerry Stuckle

    #2
    Re: PEAR used inside a function

    kevin bailey wrote:
    Currently have had to give up on this one!
    >
    How would I use a PEAR class inside a new function?
    >
    I would like to include the mail_queue class inside a function to send out
    emails when the function has been called.
    >
    However, when I try to do this I get the
    >
    Fatal error: Call to a member function on a non-object
    in /usr/share/php/Mail/Queue.php
    >
    error
    >
    Currently I'm going to continue to call the mail_queue from the normal code
    - but would like to know how to get it working from inside a function for
    future reference.
    >
    Thanks,
    >
    Kevin
    Kevin,

    It should be no different than using the object anyplace else. But
    without the failing code any answer is a pure guess.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...