I have a very simple model. I want to add a send email routine to on of the methods for the model:
$this->Email->delivery = 'smtp';
$this->Email->template = 'default';
$this->Email->sendAs = 'text';
$this->Email->from = 'email';
$this->Email->to = 'email';
$this->Email->subject = 'Error';
I've tried putting
App::import('Component', 'Email');
at the top, to no avail. The error I get is:
Fatal error: Call to undefined method stdClass::send() in E:\xampp\htdocs8080\app\models\debug.php on line 23
Any ideas?
I'm running CakePHP 1.2