문제

I'd like to ask here, how can I open a .eml file, located in the file system, in a WebBrowser control. Here's what I've at this moment:

string uri = Convert.ToString(myDataReader["Uri"]); //obtained the URI from a database query a few lines of code earlier


FileInfo file = new FileInfo(uri);
OpenPop.Mime.Message mensagem = OpenPop.Mime.Message.Load(file);

origem = mensagem.Headers.From.ToString(); //origin of the email
destino = mensagem.Headers.To.ToString(); //destiny
assunto = mensagem.Headers.Subject.ToString(); //subject
conteudo = mensagem.MessagePart.Body; //message body

I'm using OpenPop.Net to get the messages from the POP3 server in another form, and I need to know how to get the HTML part of those messages...

Thanks in advance!

João Borrego

도움이 되었습니까?

해결책

Have you checked out the examples for OpenPop.Net? Specifically you should check out the "Find specific parts of an email (text, html, xml)" example.

There is a introduction to how email works on the website as well. This might be helpful in understanding how OpenPop.Net is built since it evolves around how emails are structured internally.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top