Re: Best practice or not for using Email component in the model

2008-05-07 Thread Marcin Domanski
Hey > Alternatively, you could create a Email model which saves info to the > database, which is then read from a shell scheduled in cron to send > the actual emails :) I used the email component this way - Email model and saving the serialized data,template name subject etc in the db and send

Re: Best practice or not for using Email component in the model

2008-05-07 Thread Adam Royle
Something I have wondered as well. From some light research it seems ROR uses ActionMailer::Base subclassed as a model that renders views. Maybe someone from the cake core can give their opinion. Alternatively, you could create a Email model which saves info to the database, which is then read f

Best practice or not for using Email component in the model

2008-05-07 Thread dericknwq
There are times where I seriously feel the need to send an email from the model like at the afterSave() stage or something. Say each time a new comment is added to a post, a notification will be sent to participants depending on certain conditions. It just feels more correct having those checks an