Maybe i'm wrong, but wouldn't you want the emailing of a user in the
controller instead of the Model?
<?
/*
modfied from cakephp manual
*/
class BookmarksController extends AppController
{
function save()
{
if (!empty($this->data)){
if ($this->Bookmark->save($this->data['Bookmarks']))
{
$this->_sendEmail($address,'Bookmark Saved','Bookmark
saved to database');
}
}
}
/* maybe this function belongs in the AppController? */
function _sendEmail($email='',$subject='',$msg='')
{
mail($email,$subject,$msg);
return true;
}
}
?>
nate wrote:
> All the data is available inside the model as an array, and can be
> referenced as $this->data.
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---