0

I would like that a button click on an ASP.NET page opens a new mail with the default mail client, filled with an HTML content.

I tried SmtpClient, but it doesn't show the mail, it sends it directly.

I tried Outlook interop, but I have the expected result only in debug, when I deploy the code server side I have the following message : "Retrieving the COM class factory for component with CLSID failed due to the following error: 80070005 Access is denied" (I installed Outlook both serverside and clientside).

And finally I tried .Process() with System.Diagnostics. This shows the mail before sending it, this fills it with a text, but I need the body to be formatted in HTML.

Anyone could help please ?

Thank you,

messaid
  • 1
  • 1
  • What you are trying to do is impossible. The closest you are going to get is a mailto link with body and subject parameters. – VDWWD Sep 04 '20 at 17:27

1 Answers1

0

I have the begining of a clue with SmtpClient, it consist on writing an eml file that has its body formatted in html. I could open it after and do a "forward" on it.

How to save MailMessage object to disk as *.eml or *.msg file

messaid
  • 1
  • 1