Hi Tarique

>> What is the recommended approach for an AfterSave function triggering
>> and sending an email notification on a saved or submitted form? Thanks.
> 
> I personally prefer doing this in the Controller as I tend to use a
> component to send emails. Keeps the Model free of any dependencies
> 
> If at all you want to do this with the Model then I would suggest make
> the Model Observable and the Email component should be an Observer

I was having thoughts along those lines too.  I have a project underway 
that will require exactly that functionality.

For instance: when a stock level in the database reaches a certain point 
it should trigger a variety of functions like emailing people and 
queuing new orders.  I don't want to tie this to the model, but make it 
a configurable option with its own controller.

Regards,
Langdon

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