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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to