mailgun / talon

Apache License 2.0
1.27k stars 285 forks source link

Quotes extraction failed with Polymail replies #134

Closed esetnik closed 7 years ago

esetnik commented 7 years ago

Replies initiated from polymail do not extract the quoted text.

Steps to reproduce:

  1. Send a message to yourself using polymail
  2. Read that message in gmail and reply to it
  3. Read the message in polymail and reply to it
  4. Get the original message and test on talon testing site.

Example:

Return-Path: <xxxx@gmail.com>
Received: from localhost (ec2-54-158-139-194.compute-1.amazonaws.com. [54.158.139.194])
        by smtp.gmail.com with ESMTPSA id q32sm10037057qtd.5.2017.04.11.19.08.54
        for <xxxx@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 11 Apr 2017 19:08:55 -0700 (PDT)
Mime-Version: 1.0
X-Mailer: Polymail
Message-ID: <58ed8c0700bfbb00001339d3@polymail.io>
Subject: Re: Test
From: Ethan Setnik <xxxxgmail.com>
To: Ethan Setnik <xxxx@gmail.com>
Date: Tue, 11 Apr 2017 19:08:45 -0700
In-Reply-To: <CAKzr07V771zMRYAE9m9yU1NqnGGtkbmUSOvWWz84J2O+i5-ubg@mail.gmail.com>
References: <CAKzr07V771zMRYAE9m9yU1NqnGGtkbmUSOvWWz84J2O+i5-ubg@mail.gmail.com>
Content-Type: multipart/alternative; boundary=379c710cb6a99096f577366db69dccf23b4f785368751bb5acb86a2e162a

--379c710cb6a99096f577366db69dccf23b4f785368751bb5acb86a2e162a
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

This is the reply from Polymail

On Tue, Apr 11, 2017 at 10:07 PM Ethan Setnik

<
mailto:Ethan Setnik <xxxx@gmail.com>
> wrote:

a, pre, code, a:link, body { word-wrap: break-word !important; }

This is the reply

On Tue, Apr 11, 2017 at 10:07 PM Ethan Setnik <
mailto:xxxx@gmail.com
> wrote:

This is the initial message
--379c710cb6a99096f577366db69dccf23b4f785368751bb5acb86a2e162a
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<img style=3D"border: none; background:none; width: 0; height: 0;" src=3D"h=
ttps://share.polymail.io/v2/z/a/NThlZDhjMDcwMGJm/y6ry9vAsZIPxUbBfihWq6SToKm=
8ok2BlbhzkP296GDPgMIHiWWU4BGEw66uif81ucgL4a8UOrQQwwC_UjBeGCbM9In5alO4MMVE8t=
vBv8AZYGvniUINmkwConAMIHC8HJqpDarTqW6RRpNOc.png" alt=3D"" width=3D"0px" hei=
ght=3D"0px" border=3D"0" /><div></div>
<div>
This is the reply from Polymail<br><br>
</div>
<div id=3D"psignature"><br></div>
<div class=3D"gmail_extra"><br><div class=3D"gmail_quote"><div dir=3D"ltr">=
On Tue, Apr 11, 2017 at 10:07 PM Ethan Setnik <xxxxx@gmail.com> &lt;<a hr=
ef=3D"mailto:Ethan Setnik <xxxxx@gmail.com>">Ethan Setnik <xxxxx@gmail.=
com></a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><!DOCTYPE html>=
<html><head><meta name=3D"viewport" content=3D"width=3Ddevice-width"><style=
>a, pre, code, a:link, body { word-wrap: break-word !important; }</style></=
head><body>
<div dir=3D"ltr">This is the reply</div>
<br><div class=3D"gmail_quote"></div>
</body></html><div dir=3D"ltr">On Tue, Apr 11, 2017 at 10:07 PM Ethan Setni=
k &lt;<a href=3D"mailto:xxxxx@gmail.com">xxxxx@gmail.com</a>&gt; wrote:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><img style=3D"border:none;backgrou=
nd:none;width:0;height:0" src=3D"https://ci4.googleusercontent.com/proxy/JX=
XTuFue-6g3aDYP_klLyNmTSWdgpANzRviNIzs2xpEC3ZMdoU8vXxg9DwFJpUnjRTFU6s4roA3f7=
IW_t3ZahYdgJo_3GAl4qZoNqEse6VsyfI6rmoLF5dB2iRmlV1GUNQgdinzLxOFTi_ycHjBzJQ-r=
vKcMqnQAw3tD9GyeqniSbhysEgK2xMhP4OakJkFptqHAzVbC3TClDGj_UN617anYUW0043qgREP=
JDoT0wBMyTqNruExX68G_alPEZjE-VN3Xr_X3sb4EwxlEoIEU30xD9KHS7tnGwkB9BN0=3Ds0-d=
-e1-ft#https://share.polymail.io/v2/z/a/NThlZDhiYjVjZDU1/OoigMTRZhepebW8cok=
gLWKlfeOn7lYi8eweMZ5IXUoacBlsPJJOLaoXSc0u1N-c2QTywVrJgUzzUmzFmBx1UwiHWkaj_W=
gHTH6qG4m-Eo_t1ETpIvzwZKvwaUKsm_3VFDUQj4i5HZZojujdK.png" alt=3D"" width=3D"=
0px" height=3D"0px" border=3D"0" class=3D"gmail_msg">This is the initial me=
ssage</blockquote></div></div></blockquote></div><br></div>
--379c710cb6a99096f577366db69dccf23b4f785368751bb5acb86a2e162a--