I get TONS of email from customer.
Over time, this email helps me to determine what areas in our product collection are opportunities for enhancement or improvement.
I store the email that comes from my blog contact form in folders and then search through them looking for trends periodically.
It occurred to me that, while I need to get the emails because many of them are actionable, it would be great if I could use reporting and analysis tools against the collection.
So I whipped together a sample in ASP.NET MVC
I set up a simple SQL Express database and use Visual Studio to generate an EntityDataModel for it.
I implemented the view above and an ActionResult for HttpPost events from the ContactUs view.
Since my view uses that model, on post back my ActioResult can just create an instance of the model and call the generated “AddToMessages” (to insert to the Messages Table) method and pass in the Message instance from the View.
Wow – easy and elegant.
BTW the SendMailMessage method looks like this.
Hope someone finds it useful.
[ Full project HERE ]