Sending an email with attachment from server side

Posted by SaravananArumugam on Programmers See other posts from Programmers or by SaravananArumugam
Published on 2012-09-11T13:58:01Z Indexed on 2012/09/11 15:49 UTC
Read the original article Hit count: 314

Filed under:
|
|

I have to create a word document in a specific format and send it as attachment to some email addresses.

I have a preview screen for the report which on approval has to be send in email. This is an ASP.NET MVC 3 application.

I am left with a few options here.

  1. I am creating the preview using html. I can convert this html into doc and send it, which would be a straight solution. But capturing the Response object's output is being a tough job.

  2. I thought of using Mail merge functionality of MS word, where I'll be filling the placeholders of the doc template. But the problem is conceptually, it doesn't appear to be mail merge.

  3. I have found someone suggesting to use RTF format and replace the placeholders with database values.

Which is the right thing to do? What's the best solution here? Is there any other option than the three listed above?

© Programmers or respective owner

Related posts about asp.net-mvc

Related posts about email