Rob, That's what I do.
And I decided not to get hung up about what's "model" and "view" in these cases. Seems like an unproductive line of thought to pursue. I assume in "everything is an object" languages, specific parts of the view will be encapsulated in an object and method. If it bothers someone using ColdFusion to include objects that render portions of the view in the "model" directory, it can be places it another directory. I don't bother. I use naming convention to distinguish them, RenderEmail.cfc for instance. I also have objects and methods generating portions of the view in certain cases where it became complex and/or useful to do it that way. I've found "* render*" CFC's to be very useful, and use them often. I could place methods at the top of the view template, but then that seems messy *to me* - and I can't reuse those methods across view templates. Nando On Sat, Aug 1, 2009 at 5:03 PM, Sir Rawlins < [email protected]> wrote: > > Hello Guys, > > I wanted to get your opinions on how you distribute emails from within > your MG apps. I'm sure I remember reading a thread a while back about > how some people consider an email a 'view' and so would render the > HTML as a view, this I guess was called from the model using an cfhttp > call or something? and then distributed. > > I myself have always just used a cfsavecontent tag in the model which > saves the HTML into a variable, this is then passed to a mailerservice > which contains all my POP/SMTP settings and this actually does the job > of sending the email. > > I wanted to see what others were doing as for me having the HTML mixed > in the model always felt a little messy to me. > > Cheers guys, appreciate your thoughts. > > Rob > > > -- Nando M. Breiter The CarbonZero Project CP 234 6934 Bioggio Switzerland +41 76 303 4477 [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "model-glue" 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/model-glue?hl=en For more about Model-Glue, check http://www.model-glue.com . -~----------~----~----~----~------~----~------~--~---
