Hi Thanks for advise , I know I have to brush up on my OOP even though I been programming PHP for over 5 years I still battle with it.
I am actually following the tutorial I found at cakephp and thats directly copied out. Im calling in Cakephp like this: var $components = array ('Pagination','Mailer'); // Added Ok Im getting it to work now. The tutorial was not correct. Thanks for comments On Mar 26, 4:38 pm, "Brian Dailey" <[EMAIL PROTECTED]> wrote: > You won't need to use $this-> when calling it from a controller. > > You'll probably need to do something like: > > $mailer = new Mailer; > $mailer->AddAddress('[EMAIL PROTECTED]'); > > I suggest brushing up on PHP OOP techniques. The book "PHP 5 Objects, > Patterns, and Practice" by Zandstra is a great way to familiarize > yourself with this sort of thing. I promise it will make your life a > lot easier when you attempt to develop programs in CakePHP. > > On 3/26/07, Daniel Pape <[EMAIL PROTECTED]> wrote: > > > > > Is $this->Mailer an instance of class.phpmailer?? > > > 2007/3/26,Enchy<[EMAIL PROTECTED]>: > > > > Hi > > > > I installed phpmailer > > > > Calling it like the tutorial says: > > > vendor('phpmailer/class.phpmailer'); > > > > And then error: > > > Call to undefined function: addaddress() in /usr/www/users/struts/cake/ > > > app/controllers/hunters_controller.php on line 37 > > > > line 37: > > > $this->Mailer->AddAddress('[EMAIL PROTECTED]'); > > > > I can't figure out why. I coppied phpmailer to vendors?? > > > Also tried copying it to both vendors directories.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---