I also handle this in the model. Mostly because my email service is in
the model and I like to keep as much stuff in the model as I can.

I've heard arguments about an email being a view and I couldn't really
come up with a reason why it isn't a view, because emails are viewed.

So neither model nor view are 'wrong'. It comes down to preference.

Dan


On 8/2/09, Nando <[email protected]> wrote:
> 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]
>
> >
>


-- 
“Come to the edge, he said. They said: We are afraid. Come to the
edge, he said. They came. He pushed them and they flew.”

 Guillaume Apollinaire quotes

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

Reply via email to