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

Components are supposed to be used in controllers, not models.
In your controller use
```
```
var $components = array('Email');
```
```
There is no need to use App::import();
Without knowing your app and reasons for wanting to use it in a model, I might suggest you re-think your system architecture and move this logic to your controller.
If you definitely need it in your mode, your code included something like...
```
```
$this->Email->delivery = ...
```
```
Have you put created a new instance of the component and set it to a property of your model called Email? (No idea if this will work mind.)
The error you are getting is because you are calling the send() method on a the stdClass object i.e. not an instance of the EmailComponent.