diff --git a/talon/quotations.py b/talon/quotations.py
index 6016310..9286209 100644
--- a/talon/quotations.py
+++ b/talon/quotations.py
@@ -146,6 +146,14 @@ RE_ANDROID_WROTE = re.compile(u'[\s]*[-]+.*({})[ ]*[-]+'.format(
         'wrote'
     ))), re.I)
 
+# Support polymail.io reply format
+# On Tue, Apr 11, 2017 at 10:07 PM John Smith
+#
+# <
+# mailto:John Smith <johnsmith@gmail.com>
+# > wrote:
+RE_POLYMAIL = re.compile('On.*\s{2}<\smailto:.*\s> wrote:', re.I)
+
 SPLITTER_PATTERNS = [
     RE_ORIGINAL_MESSAGE,
     RE_ON_DATE_SMB_WROTE,
@@ -162,7 +170,8 @@ SPLITTER_PATTERNS = [
                '( \S+){3,6}@\S+:'),
     # Sent from Samsung MobileName <address@example.com> wrote:
     re.compile('Sent from Samsung .*@.*> wrote'),
-    RE_ANDROID_WROTE
+    RE_ANDROID_WROTE,
+    RE_POLYMAIL
     ]
 
 RE_LINK = re.compile('<(http://[^>]*)>')
@@ -170,7 +179,7 @@ RE_NORMALIZED_LINK = re.compile('@@(http://[^>@]*)@@')
 
 RE_PARENTHESIS_LINK = re.compile("\(https?://")
 
-SPLITTER_MAX_LINES = 4
+SPLITTER_MAX_LINES = 6
 MAX_LINES_COUNT = 1000
 # an extensive research shows that exceeding this limit
 # leads to excessive processing time

Quotes extraction failed with Polymail replies
Replies initiated from [polymail](https://polymail.io/) 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](http://talon.mailgun.net/).

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--
```
diff --git a/tests/text_quotations_test.py b/tests/text_quotations_test.py
index 7a81c99..c02c375 100644
--- a/tests/text_quotations_test.py
+++ b/tests/text_quotations_test.py
@@ -35,6 +35,19 @@ On 11-Apr-2011, at 6:54 PM, Roman Tkachenko <romant@example.com> wrote:
 
     eq_("Test reply", quotations.extract_from_plain(msg_body))
 
+def test_pattern_on_date_polymail():
+    msg_body = """Test reply
+
+On Tue, Apr 11, 2017 at 10:07 PM John Smith
+
+<
+mailto:John Smith <johnsmith@gmail.com>
+> wrote:
+Test quoted data
+"""
+
+    eq_("Test reply", quotations.extract_from_plain(msg_body))
+
 
 def test_pattern_sent_from_samsung_smb_wrote():
     msg_body = """Test reply
@@ -54,7 +67,7 @@ def test_pattern_on_date_wrote_somebody():
     """Lorem
 
 Op 13-02-2014 3:18 schreef Julius Caesar <pantheon@rome.com>:
-    
+
 Veniam laborum mlkshk kale chips authentic. Normcore mumblecore laboris, fanny pack readymade eu blog chia pop-up freegan enim master cleanse.
 """))
 
@@ -256,7 +269,7 @@ def test_with_indent():
 
 ------On 12/29/1987 17:32 PM, Julius Caesar wrote-----
 
-Brunch mumblecore pug Marfa tofu, irure taxidermy hoodie readymade pariatur. 
+Brunch mumblecore pug Marfa tofu, irure taxidermy hoodie readymade pariatur.
     """
     eq_("YOLO salvia cillum kogi typewriter mumblecore cardigan skateboard Austin.", quotations.extract_from_plain(msg_body))
 
@@ -381,11 +394,11 @@ Veniam laborum mlkshk kale chips authentic. Normcore mumblecore laboris, fanny p
 
 def test_dutch_from_block():
     eq_('Gluten-free culpa lo-fi et nesciunt nostrud.', quotations.extract_from_plain(
-    """Gluten-free culpa lo-fi et nesciunt nostrud. 
+    """Gluten-free culpa lo-fi et nesciunt nostrud.
 
 Op 17-feb.-2015, om 13:18 heeft Julius Caesar <pantheon@rome.com> het volgende geschreven:
-    
-Small batch beard laboris tempor, non listicle hella Tumblr heirloom. 
+
+Small batch beard laboris tempor, non listicle hella Tumblr heirloom.
 """))
 
 

pip install -e .[dev]
parse_log_pytest
lxml>=2.3.3 regex>=1 numpy scipy scikit-learn>=0.16.1 chardet>=1.0.1 cchardet>=0.3.5 cssselect six>=1.10.0 html5lib mock nose>=1.2.1 coverage
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
cchardet @ file:///croot/cchardet_1736182485390/work
chardet @ file:///tmp/build/80754af9/chardet_1607706775000/work
coverage @ file:///croot/coverage_1734018327576/work
cssselect @ file:///croot/cssselect_1707339882883/work
exceptiongroup==1.2.2
html5lib @ file:///Users/ktietz/demo/mc3/conda-bld/html5lib_1629144453894/work
iniconfig==2.1.0
joblib @ file:///croot/joblib_1718217211762/work
lxml @ file:///croot/lxml_1737039601731/work
mock @ file:///tmp/build/80754af9/mock_1607622725907/work
nose @ file:///opt/conda/conda-bld/nose_1642704612149/work
numpy @ file:///croot/numpy_and_numpy_base_1736283260865/work/dist/numpy-2.0.2-cp39-cp39-linux_x86_64.whl#sha256=3387e3e62932fa288bc18e8f445ce19e998b418a65ed2064dd40a054f976a6c7
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
regex @ file:///croot/regex_1736540786412/work
scikit-learn @ file:///croot/scikit-learn_1737988764076/work
scipy @ file:///croot/scipy_1733756309941/work/dist/scipy-1.13.1-cp39-cp39-linux_x86_64.whl#sha256=3b247b926209f2d9f719ebae39faf3ff891b2596150ed8f8349adfc3eb19441c
six @ file:///tmp/build/80754af9/six_1644875935023/work
-e git+https://github.com/mailgun/talon.git@0b55e8fa778ef3927b68a542ee4f3e289549cd83#egg=talon
threadpoolctl @ file:///croot/threadpoolctl_1719407800858/work
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
webencodings==0.5.1

name: talon
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - blas=1.0=openblas
  - ca-certificates=2025.2.25=h06a4308_0
  - cchardet=2.1.7=py39h6a678d5_1
  - chardet=4.0.0=py39h06a4308_1003
  - coverage=7.6.9=py39h5eee18b_0
  - cssselect=1.2.0=py39h06a4308_0
  - html5lib=1.1=pyhd3eb1b0_0
  - icu=73.1=h6a678d5_0
  - joblib=1.4.2=py39h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgfortran-ng=11.2.0=h00389a5_1
  - libgfortran5=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libopenblas=0.3.21=h043d6bf_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libxml2=2.13.5=hfdd30dd_0
  - libxslt=1.1.41=h097e994_0
  - lxml=5.3.0=py39h57af460_1
  - mock=4.0.3=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - nose=1.3.7=pyhd3eb1b0_1008
  - numpy=2.0.2=py39heeff2f4_0
  - numpy-base=2.0.2=py39h8a23956_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - pybind11-abi=4=hd3eb1b0_1
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - regex=2024.11.6=py39h5eee18b_0
  - scikit-learn=1.6.1=py39h6a678d5_0
  - scipy=1.13.1=py39heeff2f4_1
  - setuptools=72.1.0=py39h06a4308_0
  - six=1.16.0=pyhd3eb1b0_1
  - sqlite=3.45.3=h5eee18b_0
  - threadpoolctl=3.5.0=py39h2f386ee_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - webencodings=0.5.1=py39h06a4308_1
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
prefix: /opt/conda/envs/talon

tests/text_quotations_test.py::test_pattern_on_date_polymail
tests/text_quotations_test.py::test_too_many_lines tests/text_quotations_test.py::test_pattern_on_date_somebody_wrote tests/text_quotations_test.py::test_pattern_sent_from_samsung_smb_wrote tests/text_quotations_test.py::test_pattern_on_date_wrote_somebody tests/text_quotations_test.py::test_pattern_on_date_somebody_wrote_date_with_slashes tests/text_quotations_test.py::test_date_time_email_splitter tests/text_quotations_test.py::test_pattern_on_date_somebody_wrote_allows_space_in_front tests/text_quotations_test.py::test_pattern_on_date_somebody_sent tests/text_quotations_test.py::test_line_starts_with_on tests/text_quotations_test.py::test_reply_and_quotation_splitter_share_line tests/text_quotations_test.py::test_english_original_message tests/text_quotations_test.py::test_german_original_message tests/text_quotations_test.py::test_danish_original_message tests/text_quotations_test.py::test_reply_after_quotations tests/text_quotations_test.py::test_android_wrote tests/text_quotations_test.py::test_reply_wraps_quotations tests/text_quotations_test.py::test_reply_wraps_nested_quotations tests/text_quotations_test.py::test_quotation_separator_takes_2_lines tests/text_quotations_test.py::test_quotation_separator_takes_3_lines tests/text_quotations_test.py::test_short_quotation tests/text_quotations_test.py::test_with_indent tests/text_quotations_test.py::test_short_quotation_with_newline tests/text_quotations_test.py::test_pattern_date_email_with_unicode tests/text_quotations_test.py::test_english_from_block tests/text_quotations_test.py::test_german_from_block tests/text_quotations_test.py::test_french_multiline_from_block tests/text_quotations_test.py::test_french_from_block tests/text_quotations_test.py::test_polish_from_block tests/text_quotations_test.py::test_danish_from_block tests/text_quotations_test.py::test_swedish_from_block tests/text_quotations_test.py::test_swedish_from_line tests/text_quotations_test.py::test_norwegian_from_line tests/text_quotations_test.py::test_dutch_from_block tests/text_quotations_test.py::test_quotation_marker_false_positive tests/text_quotations_test.py::test_link_closed_with_quotation_marker_on_new_line tests/text_quotations_test.py::test_link_breaks_quotation_markers_sequence tests/text_quotations_test.py::test_from_block_starts_with_date tests/text_quotations_test.py::test_bold_from_block tests/text_quotations_test.py::test_weird_date_format_in_date_block tests/text_quotations_test.py::test_dont_parse_quotations_for_forwarded_messages tests/text_quotations_test.py::test_forwarded_message_in_quotations tests/text_quotations_test.py::test_mark_message_lines tests/text_quotations_test.py::test_process_marked_lines tests/text_quotations_test.py::test_preprocess tests/text_quotations_test.py::test_preprocess_postprocess_2_links tests/text_quotations_test.py::test_split_email
talon/quotations.py
talon/quotations.py