title: What would be considered the best way to architect sending email from a C# web application?
body: <p>I am working on a web application that will be going live soon, and I am now trying to figure out the best way for handling sending email from the application.  I understand completely HOW to send email from the application using the MailMessage and SmtpClient classes, however my question is from a different angle.  My main purpose at my job before this project was support of old applications that had been developed before my time.  In these applications, when they needed to send email, they hard coded any of the messages into the actual message with all of the HTML tags embeded directly into the C# code.</p>
  
  <p>The application that I am working on will have a template for the emails to be sent in, as a sort of styling container, and the different messages will be embeded into the main content div's of the template.  I would like to avoid hardcoding these templates in this application, so I have been trying to figure out the best way to layout my project.  I have thought of using a t4 template, and reading the different t4's into the application and applying a String.Format with the specified parameters to add names/emails to the messages to be sent.  However, I am not sure this is the best way to do it.</p>
  
  <p>My other idea was to define a class for each type of message, however this would end up hardcoding messages again, which as I said I don't want to do.</p>
  
  <p>My question is, how have you approached this in the past?  What worked, and what didn't and for what reasons?  I have looked all over online, but either the only content out there is on HOW to send the message, or I have not used the right Google power words.</p>