简体   繁体   中英

Having a mail in previsualization from an ASP.NET page with HTML body

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,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM