DHH: Think of emails as views delivered through SMTP
loudthinking.com
loudthinking.com
On the other hand, when a user signs up at PE, we fire that email off via the controller. There are certain times in our application where we don't want to send an email out simply when a new User model is created.
This seems like a silly argument; just do what works best for your app. Is an email a view? Use it in your controller. Is your email an asynchronous notification? Maybe it belongs in your model.
Considering the how many entry points could trigger a notification, the controller would be an insane place to put these, even with a mixin. An observer seems a far better place for that type of message.
For different modalities, like Email, SMS, or Twitter interactions, do NOT attempt to hack it into rails; rather, reuse the models defined in a Rails project and implement or use a different view/controller stack better suited for those environments.
http://www.robbyonrails.com/articles/2009/11/16/sending-emai...
Discussed here: