Have you told the the UsersController to use the email component?

  var $components= array('Email');

Chris wrote:
> Hi Guys
>
> I've been trying to use the PHPMailer Compoent as described in
> http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer
>
> But I get the following error..
>
> Fatal error: Call to undefined method stdClass::send() in F:\xampplite
> \htdocs\cake\app\controllers\users_controller.php on line 148
>
> >From user_controller...
>
>            //Try to save as normal, shouldn't work if the field was
> invalidated.
>             if($this->User->save($this->data))
>             {
>                 $this->redirect('/users/index/saved');
>
>           $this->Email->template = 'email/confirm';
>             // You can use customised thmls or the default ones you
> setup at the start
>
>             $this->set('data', $this->data['User']);
>             $this->Email->to = '[EMAIL PROTECTED]';
>             $this->Email->subject = 'your new account';
>
>
> Line148 $result = $this->Email->send();
>             }
>             else
>             {
>                  $this->render();
>             }
>
>
> Can anyone tell me what this error means, and more importantly how to
> get rid of it??
>
> Thanks in advance
>
> Chris
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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