I’m creating templates for outgoing emails and a view seems like the best place for the template. The model is doing the handling of the actual email. So I wanted to see if I’m breaking any convention.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would do it exactly as you are suggesting:
If you we’re sending views to browser for output, I’d keep all that stuff separate, but since you’re sending emails, which is more data oriented, I’d keep all my email logic in one model… template loading, sending and all.
Oh yeah, and storing you’re email template in a view is the absolute best thing to do.