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