Click here to Skip to main content
15,920,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a html table I would like to open it on outlook compose message when a button is clicked Is it possible?

What I have tried:

I tried mailto in javascript; mailmessage in C#
Posted
Updated 16-Mar-16 4:47am

1 solution

You can do that, but it's a bit messy.

Basically, create the .msg file at the server (either use interop or a third party .msg api like this one: MSG .NET - Outlook MSG API[^]. NB. this is not an endorsement: I have not used this API!)

Then create a handler (ashx) to download the msg file. It will open up in Outlook with all the content you have added. You can even add the body in html format.

Hope that helps ^_^
Andy
 
Share this answer
 
Comments
Member 11698441 17-Mar-16 1:36am    
Im a newbie to this.could you please explain what is interop? and I want to do it without any 3rd party api
Andy Lanng 17-Mar-16 5:01am    
Interop is the Microsoft Office API. You need to have Office installed on the machine that uses it as well as the development machine.

To get started, just google "interop C#'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900