Pavel
Pavel

Reputation: 11

Show mail message in WebBrowser control

I'm trying to design a mailing system (.NET C#).

Messages are stored in database in two tables:

So, the content of message is divided into parts (html body, plain text body, sources for html, attachments)

I can't find a way how could i display the message in the WebBrowser control in case when I have html with embedded images. I will have html that references images by content id, i will have images encoded in base64. Now how can I link them and display?

The only ideea that comes to me is building an mht file and open it in the WebBrowser. But besides that i can't figure out how to do this too, the last thing i want is to create files on the local system.

So, the questions are:

Thank you!

Upvotes: 1

Views: 1810

Answers (1)

Aryabhatta
Aryabhatta

Reputation:

You could create the mht file and set the mimetype to multipart/mime.

Here is a webpage which has some code to create MHT (possibly relying on dlls you need to install separately): http://www.eggheadcafe.com/articles/20040527.asp

Perhaps this might be helpful too: http://msdn.microsoft.com/en-us/library/aa488379(EXCHG.65).aspx

Upvotes: 1

Related Questions