EmailReplyParser icon indicating copy to clipboard operation
EmailReplyParser copied to clipboard

Does this parse html emails?

Open shyamal890 opened this issue 6 years ago • 4 comments

shyamal890 avatar Dec 10 '18 09:12 shyamal890

No, I don't think so. The original project doesn't either.

But SigParser's API for parsing emails can handle HTML emails.

PaulDMendoza avatar Dec 10 '18 17:12 PaulDMendoza

It does @shyamal890 Sorry for the late response. @PaulDMendoza FYI as well :point_up:

EricJWHuang avatar Dec 18 '18 11:12 EricJWHuang

@EricJWHuang No, it doesn't support HTML emails. I was able to prove this by calling your Nuget package with an HTML string. See the below example. There also isn't any code in this repo which converts HTML to text so I'm not sure how it would be expected to.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DotNetReplyParser2
{
    class Program
    {
        static void Main(string[] args)
        {

            var parser = new EmailReplyParser.Lib.Parser();
            var reply = parser.ParseReply(@"I get proper rendering as well.
<br/>
<br/>
Sent from a magnificent torch of pixels
<br/>
<div>On Dec 16, 2011, at 12:47 PM, Corey Donohoe &lt;[email protected]&gt; wrote:
<br/>&gt; Was this caching related or fixed already?  I get proper rendering here.
<br/>&gt; <img src=""https://img.skitch.com/20111216-m9munqjsy112yqap5cjee5wr6c.jpg"" />
<br/>&gt; ---
<br/>&gt; Reply to this email directly or view it on GitHub:
<br/>&gt; https://github.com/github/github/issues/2278#issuecomment-3182418
</div>");
            
            Console.WriteLine(reply);

        }
    }
}

Outputs this which means the library isn't handling HTML emails.

image

PaulDMendoza avatar Dec 18 '18 16:12 PaulDMendoza

@EricJWHuang Can you please confirm if HTML emails would be supported?

shyamal890 avatar Jan 03 '19 11:01 shyamal890