andyedinborough / aenetmail

C# POP/IMAP Mail Client
369 stars 153 forks source link

[Regression]Problem parsing Headers after upgrade to version 1.6.0 #61

Closed nakhli closed 4 years ago

nakhli commented 12 years ago

Hello,

After upgrading to 1.6.0 nuget, I saw a regression in From and To Headers parsing. This is blocking, please try to have a look quickly. Thank you.

Expected Property From : jhon.doe@gmail.com Property To : test@example.com

Got Property From : null Property To : empty list

Email:

Return-path: <jhon.doe@gmail.com>
Envelope-to: test@example.com
Delivery-date: Sat, 24 Mar 2012 12:07:36 -0600
Received: from [209.85.216.45] (helo=mail-qa0-f45.google.com)
    by box508.bluehost.com with esmtps (TLSv1:RC4-SHA:128)
    (Exim 4.76)
    (envelope-from <jhon.doe@gmail.com>)
    id 1SBVNH-0001UX-OP
    for test@example.com; Sat, 24 Mar 2012 12:07:35 -0600
Received: by qafi31 with SMTP id i31so1689831qaf.11
        for <test@example.com>; Sat, 24 Mar 2012 11:07:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=XI5g3cp9Z4KDh86UX/bKWDXAEMXCGvauQZgtBx5bOZw=;
        b=h0/g6CgWLivOn/kFbNUMaEGxrvs4b1+tOnLHkYi541HnxLELB9QVAuldcp1Da7ousY
         bKxsSV6cirJ9HHXjTneH+vZXhKiher96G8C6o6P9YDRLwcwJc8EcMib/hiyZI4ttfIZQ
         uW7gmv5m6dN6JWY7My7T4OL8khX4x69F3epQJlCmrGvOuGebUVM9fKOGp/gyCFXbnHqc
         y1R1KUScTO0pzYbOhfGj8F8CStgg8Cfr2L1LSbQaL9RgvmWDTkBgRENhY/+rhtyyOBoG
         qxnZ3hwydFkxQZVLD0URAZ5cqVKj32wyfWccZQyL9FQwRAMJf+ECbejZyuZS+4fKQAZ0
         mBzg==
MIME-Version: 1.0
Received: by 10.224.205.130 with SMTP id fq2mr21049735qab.53.1332612454419;
 Sat, 24 Mar 2012 11:07:34 -0700 (PDT)
Received: by 10.229.102.138 with HTTP; Sat, 24 Mar 2012 11:07:34 -0700 (PDT)
Received: by 10.229.102.138 with HTTP; Sat, 24 Mar 2012 11:07:34 -0700 (PDT)
In-Reply-To: <CAME9Ad+QaZ0ZWvpcW4KiZ1O4XwZ11G=cHsBJC9j_LOd1-AkYBA@mail.gmail.com>
References: <1332444878.80209.androidMobile@web110015.mail.gq1.yahoo.com>
    <CAME9AdJHjsfkhVebotnr9PyXCzfqmEL0x1h+K7=sPNWnavDYiA@mail.gmail.com>
    <CAME9Ad+E5B1rSXC1kNFtZ8DOnWwWXa8d1v1BHqTOnhNbidNiGw@mail.gmail.com>
    <CAME9Ad+QaZ0ZWvpcW4KiZ1O4XwZ11G=cHsBJC9j_LOd1-AkYBA@mail.gmail.com>
Date: Sat, 24 Mar 2012 19:07:34 +0100
Message-ID: <CAME9AdJO2sqMpXcwmwZqLwaoKmR+4deXu3b14+Q0tOtFLds=8g@mail.gmail.com>
Subject: =?ISO-8859-1?B?RndkOiBSZSA6IOBfbCdhaWRlX3Rlc3RAamF2YWdlbg==?=
From: "Jhon & Kate Doe" <jhon.doe@gmail.com>
To: "test@example.com" <test@example.com>
Content-Type: multipart/mixed; boundary=20cf300fab43f80d9304bc0103ed

--20cf300fab43f80d9304bc0103ed
Content-Type: multipart/alternative; boundary=20cf300fab43f80d8e04bc0103eb

--20cf300fab43f80d8e04bc0103eb
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello, test forward
---------- Forwarded message ----------
From: "Jhon & Kate Doe" <jhon.doe@gmail.com>
Date: Mar 22, 2012 10:19 PM
Subject: Fwd: Re : =E0_l&apos;aide_test@example
To: "test@example.com" <test@example.com>

=C0 lo
---------- Forwarded message ----------
From: "Jhon & Kate Doe" <jhon.doe@gmail.com>
Date: Mar 22, 2012 9:23 PM
Subject: Fwd: Re : =E0_l&apos;aide_test@example
To: <test@example.com>

---------- Forwarded message ----------
From: Jhon & Kate Doe <jhon.doe@gmail.com>
Date: 2012/3/22
Subject: Re: Re : =E0_l'aide_test@example
To: test@example.com

=E0 looo

2012/3/22 Mike Doe <mike.doe@yahoo.com>

> Reply
>
>
> Envoy=E9 =E0 partir de Yahoo! Mail (sur Android)
>
>  ------------------------------
> * From: * Jhon & Kate Doe <jhon.doe@gmail.com>;
> * To: *
> * Subject: * =E0_l'aide_test@example
> * Sent: * Thu, Mar 22, 2012 7:17:25 PM
>
>   =E0 l'aide
>

--20cf300fab43f80d8e04bc0103eb
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Hello, test forward</p>
<div class=3D"gmail_quote">---------- Forwarded message ----------<br>From:=
 &quot;Jhon &amp; Kate Doe&quot; &lt;<a href=3D"mailto:jhon.doe@=
gmail.com">jhon.doe@gmail.com</a>&gt;<br>Date: Mar 22, 2012 10:19 PM<b=
r>
Subject: Fwd: Re : =E0_l&amp;apos;aide_test@example<br>To: &quot;<a href=3D=
"mailto:test@example.com">test@example.com</a>&quot; &lt;<a h=
ref=3D"mailto:test@example.com">test@example.com</a>&gt;<br><=
br type=3D"attribution">

<p>=C0 lo</p>
<div class=3D"gmail_quote"><div class=3D"quoted-text">---------- Forwarded =
message ----------<br>From: &quot;Jhon &amp; Kate Doe&quot; &lt;<a hr=
ef=3D"mailto:jhon.doe@gmail.com" target=3D"_blank">jhon.doe@gmail=
.com</a>&gt;<br>
</div><div class=3D"elided-text">Date: Mar 22, 2012 9:23 PM<br>
Subject: Fwd: Re : =E0_l&amp;apos;aide_test@example<br>To:  &lt;<a href=3D"=
mailto:test@example.com" target=3D"_blank">test@example.com</=
a>&gt;<br><br type=3D"attribution"><br><br><div class=3D"gmail_quote"><div>=
---------- Forwarded message ----------<br>

From: <b class=3D"gmail_sendername">Jhon &amp; Kate Doe</b> <span dir=
=3D"ltr">&lt;<a href=3D"mailto:jhon.doe@gmail.com" target=3D"_blank">c=
haker.Doe@gmail.com</a>&gt;</span><br></div><div>
Date: 2012/3/22<br>Subject: Re: Re : =E0_l&#39;aide_test@example<br>To: <a =
href=3D"mailto:test@example.com" target=3D"_blank">test@exampleerati=
on.com</a><br><br><br>=E0 looo<div><div><br><br><div class=3D"gmail_quote">
2012/3/22 Mike Doe <span dir=3D"ltr">&lt;<a href=3D"mailto:horia.toma@yah=
oo.com" target=3D"_blank">mike.doe@yahoo.com</a>&gt;</span><br><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex">

<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0"><tbody><tr><td vali=
gn=3D"top" style=3D"font:inherit"><p>Reply<br><br><br></p>
<p>Envoy=E9 =E0 partir de Yahoo! Mail (sur Android)</p>
</td></tr></tbody></table>            <div>
                <div>
                    <br>
                    <div style=3D"font-family:times new roman,new york,time=
s,serif;font-size:12pt">
                        <font face=3D"Tahoma">
                            <hr size=3D"1">
                            <b>
                                <span style=3D"font-weight:bold">From:</spa=
n>
                            </b>
                            Jhon &amp; Kate Doe &lt;<a href=3D"mailto=
:jhon.doe@gmail.com" target=3D"_blank">jhon.doe@gmail.com</a>&gt;=
;                            <br>
                            <b>
                                <span>To:</span>
                            </b>
                                                                           =
                                                     <br>
                            <b>
                                <span>Subject:</span>
                            </b>
                            =E0_l&#39;aide_test@example                    =
        <br>
                            <b>
                                <span style=3D"font-weight:bold">Sent:</spa=
n>
                            </b>
                            Thu, Mar 22, 2012 7:17:25 PM                   =
         <br>
                            </font>
                            <br>
                            <table cellspacing=3D"0" cellpadding=3D"0" bord=
er=3D"0">
                                <tbody>
                                    <tr>
                                        <td valign=3D"top" style=3D"font:in=
herit">=E0 l&#39;aide

</td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>
</blockquote></div><br>
</div></div></div></div><br>
</div></div>

</div>

--20cf300fab43f80d8e04bc0103eb--
--20cf300fab43f80d9304bc0103ed
Content-Type: image/png; name="color_wheel.png"
Content-Disposition: attach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UDvNbIc6denfxC1HH/htF1TnHFrvf4+YRF6gMs7B1Kv0vH9wO8EuVr
J3n9a82ZVVQ2bsHg+RhWbO6Y7L9Q41HaGLv7Gv8RYAA5OVH0igpFJAAAAABJRU5ErkJggg==
--20cf300fab43f80d9304bc0103ed
Content-Type: image/png; name="resize.png"
Content-Disposition: attachment; filename="resize.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h047klaa1

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAddJREFUeNpi/P//PwMlgImBQsACYzjOfzUTSBkjSwJdlw6kzqJrunPx
IsO/f/8Ynk32QBjw588f41hvKePbD35+UVVg59l2+M2td59/Y9j4/P597C74/fMnw+XrX75IiHDy
bFhxguEdq9ia379+nf314wfDz+/fGX79+A6kfzAws7BgDwOQAZqq3DxHdp9iMLIyYOBmZwoBeqGA
6EAE2bRs/c1bT39xtR04+eCWgaqIGhcrYyYhQ+Du+fvnT/q7D19ATjz7+s2H14dO/si01JdVO3Hx
UeZPSFRPIBSNZ2EhDrR1wpu376cfOnnrlrGGuBo3qkuMkWMLIx18vX8GFoUTXr35MH3/iZu39HTl
1DjYWUCGtHJzsy8Dunbmf2A0ggAjLCUyMjLCDeGUN2TgM49lYBRRZ/j940cBNz9vpratvtqlo5dv
BYeYqy2ZtRPkUpO384IZWLD56/vD82DMJqXLwKodMOHHd3XRU/vPhci52qitu/Dmyy9gjBGVlH89
u8zw48lF4z9CQiFmka5qN59//KKrL8sDivJvu5sxvADyAzMQs0IxGxCzA71hyGhZ2IBi8tvbN/8d
660A6n2MbgDMECYozYLGZ4KqAYFvQL0fGSnNzgABBgBbsuMDQbb6rAAAAABJRU5ErkJggg==
--20cf300fab43f80d9304bc0103ed--
MaklaCof commented 12 years ago

Just started with library. Excellent work. I don't know for previous version, but i am experiencing samo problem for two mails. First has To ok, but second doesn't.

1.: MailMessage.From = null, MailMessage.Sender = null, MailMessage.ReplyTo.Count = 0,MailMessage.To is OK.

Delivered-To: fora@something.cc Received: by 10.103.123.3 with SMTP id a3cs336951mun; Fri, 11 Feb 2011 04:51:29 -0800 (PST) Received: by 10.103.238.11 with SMTP id p11mr273601mur.64.1297428689216; Fri, 11 Feb 2011 04:51:29 -0800 (PST) Return-Path: LuisFern?ndez@something.com Received: from line86-29.adsl.kirov.ru (line86-29.adsl.kirov.ru [89.254.220.86]) by mx.google.com with SMTP id t23si609078fau.29.2011.02.11.04.51.15; Fri, 11 Feb 2011 04:51:29 -0800 (PST) Received-SPF: neutral (google.com: 89.254.220.86 is neither permitted nor denied by best guess record for domain of LuisFern�ndez@something.com) client-ip=89.254.220.86; Authentication-Results: mx.google.com; spf=neutral (google.com: 89.254.220.86 is neither permitted nor denied by best guess record for domain of LuisFern�ndez@something.com) smtp.mail=LuisFern�ndez@something.com Message-ID: 5361IS32774.VDVR.9EPSH6711UMYH1208822@something.com From: "Mr.Dolores S�nchez" LuisFern�ndez@something.com Reply-To: "Antonio Garc�a" LuisFern�ndez@something.com To: adam.rostek@something.cc Subject: The agreement is signed Date: Fri, 11 Feb 2011 10:51:22 -0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-----=326_82898122_6YEQJUZJL328381IF39.4576933L5XFLKTUIQSJAL" X-MSMail-Priority: Normal

2: MailMessage.From = null, MailMessage.Sender = null, MailMessage.ReplyTo.Count = 0, MailMessage.To.Count = 0.

Delivered-To: fora@something.cc Received: by 10.150.196.6 with SMTP id t6cs274391ybf; Mon, 13 Jun 2011 07:59:05 -0700 (PDT) Received: by 10.216.61.77 with SMTP id v55mr2697778wec.114.1307977144357; Mon, 13 Jun 2011 07:59:04 -0700 (PDT) Return-Path: Katja.Cerar@something.si Received: from EXCHCASHUBP1UL.somethingsomething.si (exchcashubp1ul.something.si [193.2.64.36]) by mx.google.com with ESMTPS id w39si13084616weq.67.2011.06.13.07.59.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Jun 2011 07:59:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of Katja.Cerar@something.si designates 193.2.64.36 as permitted sender) client-ip=193.2.64.36; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of Katja.Cerar@something.si designates 193.2.64.36 as permitted sender) smtp.mail=Katja.Cerar@something.si Received: from POSTA.something.si ([193.2.64.39]) by EXCHCASHUBP1UL.something.si ([193.2.64.36]) with mapi; Mon, 13 Jun 2011 16:59:00 +0200 From: "Cerar, Katja" Katja.Cerar@something.si Date: Mon, 13 Jun 2011 16:58:57 +0200 Subject: Motivacijski dejavniki za ukvarjanje s sportno dejavnostjo Thread-Topic: Motivacijski dejavniki za ukvarjanje s sportno dejavnostjo Thread-Index: AcwnU+D12p7O2AOtRL2yH5IN2Ip3ywAABhCAAAAQWsAAAE9WcAAAZqHgAABQ1sAAAFK+IAACcrygAAAPasAAAEXQ4AAALDZwAAAUa3AAAFjwIAABOzfwAACxEmAAmYlbwAAALalQAAB5jQAAACkFoAAATkfg Message-ID: 7AEC0848C6B05441AD691006513B74090233D7080E91@POSTA.something.si Accept-Language: sl-SI, en-US Content-Language: sl-SI X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: sl-SI, en-US Content-Type: multipart/related; boundary="_0047AEC0848C6B05441AD691006513B74090233D7080E91POSTAuniljs"; type="multipart/alternative" MIME-Version: 1.0

nakhli commented 12 years ago

I have also regressions in the Subject parsing. I'm worried about the stability of 1.6.0. We need a good battery of tests to prevent regressions...

piher commented 12 years ago

Have you found when the regression happened ?

nakhli commented 12 years ago

Saw th regression when I upgraded from 1.4.x nuget to latest 1.6.0

andyedinborough commented 12 years ago

The code for parsing addresses is quite old. In fact, I'm sure this code has not changed since I first published to Nuget. The latest check in should resolve this issue. Please confirm. Thanks!