Closed bogdan-litescu closed 11 years ago
@bogdan-litescu I think it can get quite complicated to push a lot of things to the view. Also in a multipart email, subject is usually shared among the alternate views. Having them in one place makes sense.
I needed to specify the subject of the email in the view rather than hardcoding it in the code or store it separately. This can be extended so more data can come from view such as recipients, reply tos, html body, etc.
Here's the usage:
@{ TempData["Subject"] = string.Format("A new post has been added to {0}", Model.Name); }