title: .NET template files
body: <p>I have a application that generates a couple of different mails. These mails are currently build up using a string builder that generates a HTML based string that is the mail content.</p>
  
  <p>This approach is getting messy. The code is objects mixed with HTML, etc, etc. <em>What I'd like is to have a template similar to the one used in for example MVC and then use the output of this template to add to the mail</em>.</p>
  
  <p>Can this be done using for example T4 add how wound that work or should I use another approach for this? </p>
  
  <p>The templates don't have to be editable at runtime even if that would be nice.</p>