You must Sign In to post a response.
  • Category: .NET

    How display eml files in html format using C#


    Are you looking for a way to display eml files in html format using C# ? then read this thread to know more about it



    Hello people

    I want to read through eml file and show it as html using c#. I am looking for an open source solution for this. I had come accross EAGetmail when I googled about it. However, I am not sure about the licensing policy. Is it an open source product?

    This project that I am working on is an online repository of eml files. Users will be able to browse through the emal files and even forward and reply to them.

    Thanks in advance
    Amar
  • #731900
    Hi,

    If you want to read & display eml files in html format, try to use the following links

    http://www.codeproject.com/Articles/76607/Easily-Retrieve-Email-Information-from-EML-Files-R

    http://www.c-sharpcorner.com/Blogs/11103/read-outlook-eml-file-without-outlook-api-in-C-Sharp.aspx

    http://blog.onderweg.eu/2010/12/parsing-eml-files-in-c/

  • #731911
    hey,


    here in this site give a useful code i hope this will helpful,

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/d22f45fd-d804-4258-b7a5-d6b0103f73ad/save-and-load-eml-file-with-html-body-and-attachment-in-c?forum=csharpgeneral

    there is also site you should refer ,

    http://stackoverflow.com/questions/6694178/rtf-message-bodies-in-eml-files

    http://social.msdn.microsoft.com/Forums/en-US/639afa5e-9cb1-46d0-aefb-7e6550a1ee76/how-to-convert-eml-files-to-pst-format

    thanks,
    ketan

  • #770228
    The Datavare EML to PDF Converter software is a proper solution for converting multiple EML files to Pdf files with attachments. Whether you have a large number of EML files or need to print all of them in PDF format, this software can suit your requirements. It batch prints EML files in PDF format without losing a single bit of database information. Furthermore, this tool can be used for both personal and professional purposes. Running this software does not require any technical skills. It can be used by both novices and experts to get the desired results. To begin, download the software for converting EML files to PDF.

  • #770295
    [Response removed by Admin. Read forum policies.]

  • #770399
    To display an EML file in HTML format using C#, you can use the following steps:

    Use the System.Net.Mail namespace to parse the EML file.
    Use the AlternateViews property of the MailMessage class to get the body of the EML file in HTML format.
    Use the GetString method of the AlternateView class to convert the HTML body to a string.
    Use the HtmlDecode method of the HttpUtility class to decode any HTML entities in the string.
    Use the Response.Write method to write the HTML string to the response stream.

    Do not forget to Rate the post...
    Regards,
    Sajid P K

  • #770400
    To display an EML file in HTML format using C#, you can use the following steps:

    -Use the System.Net.Mail namespace to parse the EML file.
    -Use the AlternateViews property of the MailMessage class to get the body of the EML file in HTML format.
    -Use the GetString method of the AlternateView class to convert the HTML body to a string.
    -Use the HtmlDecode method of the HttpUtility class to decode any HTML entities in the string.
    -Use the Response.Write method to write the HTML string to the response stream.

    Do not forget to Rate the post...
    Regards,
    Sajid P K

  • #770404
    With just a few lines of code,.NET programmers can quickly load and convert EML files to HTML.
    1. Use MailMessage to load an EML file. Load.
    2. Call the Save method.
    3. Pass the output file path with HTML file extension.
    4. HTML file will be saved at the specified path.


  • Sign In to post your comments