From dee4a132f6d3ef5c0418463a771fedc1ed01ced4 Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 7 Jun 2025 09:21:07 -0600 Subject: [PATCH] chase updated subjects --- scrape.go | 63 +++- scrape_test.go | 105 +++++++ testdata/chase.202506.credit.txt | 477 ++++++++++++++++++++++++++++++ testdata/chase.202506.online.txt | 480 +++++++++++++++++++++++++++++++ testdata/chase.202506.txt | 460 +++++++++++++++++++++++++++++ 5 files changed, 1584 insertions(+), 1 deletion(-) create mode 100644 testdata/chase.202506.credit.txt create mode 100644 testdata/chase.202506.online.txt create mode 100644 testdata/chase.202506.txt diff --git a/scrape.go b/scrape.go index f80654c..43ade4f 100755 --- a/scrape.go +++ b/scrape.go @@ -4,6 +4,7 @@ import ( "bytes" "errors" "fmt" + "io" "io/ioutil" "net/mail" "regexp" @@ -33,7 +34,7 @@ func Scrape(m *mail.Message, banks map[Bank]bool) ([]*Transaction, error) { func buildScraper(m *mail.Message, banks map[Bank]bool) (scraper, error) { subject := fmt.Sprint(m.Header["Subject"]) - if !containsAny(subject, "transaction", "report", "Transaction", "payment", "Payment", "Deposit", "Withdrawal", "balance is", "Balance", "Large Purchase") { + if !containsAny(subject, "transaction", "report", "Transaction", "payment", "Payment", "Deposit", "Withdrawal", "balance is", "Balance", "Large Purchase", "transaction with", "credit pending on your card") { return nil, errors.New("cannot build scraper for subject " + subject) } from := fmt.Sprint(m.Header["From"]) @@ -92,6 +93,9 @@ func containsAny(a string, b ...string) bool { } func (c *chaseScraper) scrape(m *mail.Message) ([]*Transaction, error) { + if transactions, err := c.scrape202506(m); err == nil && len(transactions) > 0 { + return transactions, err + } if transactions, err := c.scrape2025Balance(m); err == nil && len(transactions) > 0 { return transactions, err } @@ -101,6 +105,63 @@ func (c *chaseScraper) scrape(m *mail.Message) ([]*Transaction, error) { return c.scrape2020(m) } +func (c *chaseScraper) scrape202506(m *mail.Message) ([]*Transaction, error) { + if xactions, err := c.scrape202506Charge(m); err == nil && len(xactions) > 0 { + return xactions, nil + } + return c.scrape202506Credit(m) +} + +func (c *chaseScraper) scrape202506Credit(m *mail.Message) ([]*Transaction, error) { + pattern := `^You have a \$([0-9][,0-9]*\.[0-9]{2}) credit pending on your credit card` + re := regexp.MustCompile(pattern) + matches := re.FindSubmatch([]byte(m.Header["Subject"][0])) + if len(matches) < 1 { + return nil, fmt.Errorf("no match subject search (%q vs %q)", pattern, m.Header["Subject"][0]) + } + b, _ := io.ReadAll(m.Body) + + amount := string(matches[1]) + amount = strings.ReplaceAll(amount, ",", "") + vendor := "*" + + re = regexp.MustCompile(`\(\.\.\.[0-9]{4}\)`) + match := re.Find(b) + re = regexp.MustCompile(`[0-9]{4}`) + account := string(re.Find(match)) + + return []*Transaction{NewTransaction(account, amount, vendor, fmt.Sprint(m.Header["Date"]), Chase)}, nil +} + +func (c *chaseScraper) scrape202506Charge(m *mail.Message) ([]*Transaction, error) { + pattern := `^(Your|You made an?) (\$(?P[,0-9\.]*)|online, phone, or mail) transaction with (?P.*)$` + re := regexp.MustCompile(pattern) + matches := re.FindSubmatch([]byte(m.Header["Subject"][0])) + if len(matches) < 1 { + return nil, fmt.Errorf("no match subject search (%q vs %q)", pattern, m.Header["Subject"][0]) + } + b, _ := io.ReadAll(m.Body) + + amount := string(matches[3]) + if amount == "" { + pattern := `\$([0-9][,0-9]*\.[0-9]{2})` + matches := regexp.MustCompile(pattern).FindStringSubmatch(string(b)) + if len(matches) < 2 || len(matches[1]) == 0 { + return nil, fmt.Errorf("no $x,yyy,zz in body") + } + amount = matches[1] + } + amount = strings.ReplaceAll(amount, ",", "") + vendor := string(matches[4]) + + re = regexp.MustCompile(`\(\.\.\.[0-9]{4}\)`) + match := re.Find(b) + re = regexp.MustCompile(`[0-9]{4}`) + account := string(re.Find(match)) + + return []*Transaction{NewTransaction(account, amount, vendor, fmt.Sprint(m.Header["Date"]), Chase)}, nil +} + func (c *chaseScraper) scrape2025Balance(m *mail.Message) ([]*Transaction, error) { re := regexp.MustCompile(`^Your.*balance is \$[0-9,\.]*$`) if !re.Match([]byte(m.Header["Subject"][0])) { diff --git a/scrape_test.go b/scrape_test.go index 3896692..ed4b485 100644 --- a/scrape_test.go +++ b/scrape_test.go @@ -177,6 +177,111 @@ func TestScrapeChase2021Payment(t *testing.T) { t.Logf("%+v", got) } +func TestScrapeChase202506Credit(t *testing.T) { + b, err := ioutil.ReadFile("./testdata/chase.202506.credit.txt") + if err != nil { + t.Fatal(err) + } + message := &mail.Message{ + Header: map[string][]string{ + "Subject": []string{"You have a $394.96 credit pending on your credit card"}, + }, + Body: bytes.NewReader(b), + } + + chase := &chaseScraper{} + + gots, err := chase.scrape202506(message) + if err != nil { + t.Fatal(err) + } + if len(gots) != 1 { + t.Fatal(gots) + } + got := gots[0] + + if got.Account != "5876" { + t.Fatalf("bad account: %v: %+v", got.Account, got) + } + if got.Amount != "394.96" { + t.Fatalf("bad amount: %v: %+v", got.Amount, got) + } + if got.Vendor != "*" { + t.Fatalf("bad vendor: %v: %+v", got.Vendor, got) + } + t.Logf("%+v", got) +} + +func TestScrapeChase202506(t *testing.T) { + b, err := ioutil.ReadFile("./testdata/chase.202506.txt") + if err != nil { + t.Fatal(err) + } + message := &mail.Message{ + Header: map[string][]string{ + "Subject": []string{"You made a $3.42 transaction with Nintendo CB141137080"}, + }, + Body: bytes.NewReader(b), + } + + chase := &chaseScraper{} + + gots, err := chase.scrape202506(message) + if err != nil { + t.Fatal(err) + } + if len(gots) != 1 { + t.Fatal(gots) + } + got := gots[0] + + if got.Account != "5876" { + t.Fatalf("bad account: %v: %+v", got.Account, got) + } + if got.Amount != "3.42" { + t.Fatalf("bad amount: %v: %+v", got.Amount, got) + } + if got.Vendor != "Nintendo CB141137080" { + t.Fatalf("bad vendor: %v: %+v", got.Vendor, got) + } + t.Logf("%+v", got) +} + +func TestScrapeChase202506Online(t *testing.T) { + b, err := ioutil.ReadFile("./testdata/chase.202506.online.txt") + if err != nil { + t.Fatal(err) + } + message := &mail.Message{ + Header: map[string][]string{ + "Subject": []string{"You made an online, phone, or mail transaction with DD *KLUCKSKRISPYCHIC"}, + }, + Body: bytes.NewReader(b), + } + + chase := &chaseScraper{} + + gots, err := chase.scrape202506(message) + if err != nil { + t.Fatal(err) + } + if len(gots) != 1 { + t.Fatal(gots) + } + got := gots[0] + + if got.Account != "5876" { + t.Fatalf("bad account: %v: %+v", got.Account, got) + } + if got.Amount != "18.17" { + t.Fatalf("bad amount: %v: %+v", got.Amount, got) + } + if got.Vendor != "DD *KLUCKSKRISPYCHIC" { + t.Fatalf("bad vendor: %v: %+v", got.Vendor, got) + } + t.Logf("%+v", got) +} + func TestScrapeChase2021(t *testing.T) { b, err := ioutil.ReadFile("./testdata/chase.2021.txt") if err != nil { diff --git a/testdata/chase.202506.credit.txt b/testdata/chase.202506.credit.txt new file mode 100644 index 0000000..508bc98 --- /dev/null +++ b/testdata/chase.202506.credit.txt @@ -0,0 +1,477 @@ +Delivered-To: breellocaldev@gmail.com +Received: by 2002:a05:6022:5675:b0:72:1e7d:3888 with SMTP id er21csp4584200lab; + Wed, 4 Jun 2025 14:21:55 -0700 (PDT) +X-Google-Smtp-Source: AGHT+IEHEZFpfFptRb8iKNwmfilCWAGJ701ZkjFidhuUYVUH39CGReGxuKMxY2anJJipep1sauOZ +X-Received: by 2002:a05:6602:b89:b0:86c:f30b:1f53 with SMTP id ca18e2360f4ac-8731c618143mr564722439f.13.1749072114993; + Wed, 04 Jun 2025 14:21:54 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1749072114; cv=none; + d=google.com; s=arc-20240605; + b=WL5tcjRmDMa4djUmb4JWFIrG+HkINxUSguY0lXuzX4mUn1Ign88n5KZhXa9DLgKVjn + OOD0pxiJwikBLWeF0BAIH9ZLE7oUj0WVerOqw2TMRPUxGhJlPLs3bZvVukZnCUpGY88v + Igw8fo4r7ulJtxbi4rZ9zA0SJJ19hLJL5M1yLq5d9S2J4t+ZNlDro5VUkaxofJKvirRS + oue1WDn4sORjY2foIwI262UaD7Jbb1xCt806w22Ce5IAy+hH+Oy2woByR34cnFHtY8N5 + Wy4XSpuvIxwS5yCNIs+NZnQ+3h7st03BOloIpNjG97nIwu4nIHuLc0XGvpxPkshBlkzT + XAyg== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; + h=retry-count:notification-id:content-transfer-encoding:mime-version + :subject:message-id:to:from:date:dkim-signature; + bh=s8C47OdoV1gXfqN9qIkir+Y8P9kkuDnmIZQEA9WBZbw=; + fh=lrt9myTdNYNEckm/XjduC9YuGfYr3v7r45vYTr/7vKM=; + b=kqPsUii3FbWObwAWdD8O1DA0jpayOshHNJbSBHS6aNDpkwgXmB6GqaA0W+99hSLdhD + xWVDHHkbyfpAWTh5s7jKs97jT56IZwl4TTL2HGimXqpwKvNf4yLy+nPthZ6R8Yi+ufn6 + XjA2dCSn+87/RNfHE82sE7RFLuGD3LzXKyArQ7EDSo/8cV4bqq0zl1rot3vmm1rEs5P5 + A4P1QJUVXxfGsJ1oXXOfW7L3MOk6Uzb0YwirfnxIb2oDQai+RvYMgCQ/avrYQpIm09BM + vgNZqVMtD3Vcig9bxuhmbQ++gdqk55MVyTRXlVLr3CWPOWfRehdtagiZ9cRQD/yjEVkq + NRXQ==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@chase.com header.s=d4815 header.b=iVm+FQf7; + spf=pass (google.com: domain of no.reply.alerts.08@chase.com designates 146.143.72.27 as permitted sender) smtp.mailfrom=no.reply.alerts.08@chase.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chase.com +Return-Path: +Received: from vsin80p3239.jpmchase.com (vsin80p3239.jpmchase.com. [146.143.72.27]) + by mx.google.com with ESMTPS id ca18e2360f4ac-86cf5e5248esi1579461739f.41.2025.06.04.14.21.54 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 04 Jun 2025 14:21:54 -0700 (PDT) +Received-SPF: pass (google.com: domain of no.reply.alerts.08@chase.com designates 146.143.72.27 as permitted sender) client-ip=146.143.72.27; +Authentication-Results: mx.google.com; + dkim=pass header.i=@chase.com header.s=d4815 header.b=iVm+FQf7; + spf=pass (google.com: domain of no.reply.alerts.08@chase.com designates 146.143.72.27 as permitted sender) smtp.mailfrom=no.reply.alerts.08@chase.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chase.com +Received: from pps.filterd (vsin80p3239.dmz.us.jpmchase.net [127.0.0.1]) by vsin80p3239.jpmchase.com (8.18.1.2/8.18.1.2) with ESMTP id 554Kr2up017789 for ; Wed, 4 Jun 2025 21:21:54 GMT +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chase.com; h=content-transfer-encoding : content-type : date : from : message-id : mime-version : subject : to; s=d4815; bh=s8C47OdoV1gXfqN9qIkir+Y8P9kkuDnmIZQEA9WBZbw=; b=iVm+FQf7A/D88nX3I1dK8HOPR4FMeFF5OqHUJRKLUlqxP6Hj9/yrDf+dwrjS+lcHkS1Y nNGNhMyBy1jQMwfw5B6Wa49VrcD637A0zu9iHwVVW5dvIwbrkl0zC18PQDo85UdyunpY qIwrNapM9aX0cYqJZ/E12S0YaTt/3xyGdQe8eBb1iB7xDzNZTAakHiYV1JsmzL+phQfi C8r1OkSJEAY0lxMY2ksxgvW5gKx0ltYX4PKi6wV6g5vV4lc1IBhZz/4VpjWNba77SeH4 DByZmhDWFkL9qRSy5OPigrow5eJ6Xj/1bFO1P+OiPZ6Mz2dvByQ5K2Qv7G5xOz4A8LRE mQ== +Received: from vsin53p7503.nanw.jpmchase.net ([169.72.103.155]) by vsin80p3239.dmz.us.jpmchase.net (PPS) with ESMTPS id 470djp00eg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 04 Jun 2025 21:21:54 +0000 +Received: from iaasn00692069.nane.jpmchase.net (iaasn00692069.nane.jpmchase.net [169.101.108.220]) + by vsin53p7503.nanw.jpmchase.net + with ESMTP id 554LLrV6018616 + for ; Wed, 4 Jun 2025 21:21:54 GMT +Date: Wed, 4 Jun 2025 21:21:53 +0000 (UTC) +From: Chase +To: breellocaldev@gmail.com +Message-ID: <1514303812.1327452.1749072113609.JavaMail.webuser@iaasn00692069> +Subject: You have a $394.96 credit pending on your credit card +MIME-Version: 1.0 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable +NOTIFICATION-ID: CREDIT_REALTIME_AUTH-f49cf41b1787628a22bb0429e97ec4a845fde585fdfb593548c46498773b47a2-ver3-3187-941c9e20-41c8-3b3c-aefd-f27755b09008 +RETRY-COUNT: 0 + + + + + + +See more details here. + + + + + + + + + +
+ +
+ + + + +
3D""/ + + + + + + +
+ +
See more details here.
+ + + +
 ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌  ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌  ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; 
+ + + + + + + + +
+ + + +
3D"Chase
+
+ + + +
Transaction alert
+ + + +
+ + + + +
3D""= +You have a $394.96 credit pending on your credit card
3D""/
+ + + + + + + + + + + + + +
3D""/ + + + + + + + + + + +
+ + + +=09=09=09=09=09=09 + + + + + + + + +
+ + + + +
AccountChase Fr= +eedom Unlimited Visa (...5876)
+ + + + +
Date= +Jun 4, 2025 at 5:21 PM ET
+ + + + +
MerchantAMAZON M= +KTPLACE PMTS
+ + + +
Credit Amount$394.96<= +/td> +
You can visit our Resource Center anytime to help answer your questions or ma= +nage your account.
+
+ + + +
+ + + +
Review account
Securely access your accounts with = +the Chase Mobile® app or chase.com.
+ + + +
About this message
+
+ Chase Mobile® app is available for se= +lect mobile devices. Message and data rates may apply.
+
+ This service email was sent based on your ale= +rt settings. Use the Chase Mobile app or visit chase.com/alerts to view or manage your settings.
+
+ Chase cannot guarantee the delivery of alerts= + and notifications. Wireless or internet service provider outages or other = +circumstances could delay them. You can always check chase.com or the Chase Mobile app for the status of your accounts including= + your latest account balances and transaction details.
+
+ To protect your personal information, please = +don't reply to this message. Chase won't ask for confidential information i= +n an email.
+
+ If you have concerns about the authenticity o= +f this message or have questions about your account visit chase.com= +/CustomerService for ways to contact us.
+
+ Your privacy is important to us. See our onli= +ne Security Center to learn how to protect your infor= +mation.
+
+ © 2025 JPMorgan Chase & Co.
+ 3D""/ + + + + + + + + + + + diff --git a/testdata/chase.202506.online.txt b/testdata/chase.202506.online.txt new file mode 100644 index 0000000..ee137ec --- /dev/null +++ b/testdata/chase.202506.online.txt @@ -0,0 +1,480 @@ +Delivered-To: breellocaldev@gmail.com +Received: by 2002:a05:6022:5675:b0:72:1e7d:3888 with SMTP id er21csp4539254lab; + Wed, 4 Jun 2025 12:43:12 -0700 (PDT) +X-Google-Smtp-Source: AGHT+IHLeG/uqg3e2qFuWubH6OD72TD4QmoFcQ31qKCueuVIZoGu49++XdkNYyPDDDjXxgHpTYGz +X-Received: by 2002:a05:622a:17c9:b0:494:adc6:239f with SMTP id d75a77b69052e-4a5a573b3ffmr56590531cf.10.1749066192430; + Wed, 04 Jun 2025 12:43:12 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1749066192; cv=none; + d=google.com; s=arc-20240605; + b=UW84WKYFh9Li7n5AqU3nJhcA0/kJkrmUDuwjsdJ+F/1rCW6wyGavwX03AaHscl8Pob + mSnqS5M/E4dn6KxlA7F/qEfBwKLUiY+2F3IDZE+/2a0JB10vXf/zlibv0YW9+wGZ/IGo + I5CASyfhZE4v46TPcmEf0oFPynqdmLbXCaTe4C6B8cpeQoIxIIBAQSKUlqezPc0QTFfg + cI9DXK2MlS4LVV96avu/riqyjlF2C2DmrJCYVoAo3f+ZX3ZZdpbjdeFPQamu/lwVq21y + yM2IXu9AGzLATGwZSXne9eCpA9mq/77o2jBpZq4mpcmIPGwKd/Eh8+pV1pVJ5y8ADX5L + +ptw== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; + h=retry-count:notification-id:content-transfer-encoding:mime-version + :subject:message-id:to:from:date:dkim-signature; + bh=rF8v8eIeIYAhxeF3fale6PXDnNUzP2v6MrVz5J+kDO4=; + fh=lrt9myTdNYNEckm/XjduC9YuGfYr3v7r45vYTr/7vKM=; + b=EVrCwozzyia+LzWOT/2KZDSib6ZYshhBgwQLH/OtCZj802Mwz+AaV+RISBdrvrHAWK + FvVe7oFJTQ6yjpQgQtCwlwyFleGPugdlZXQyuDu7kvNM55t4RBFf3MvJxgHzrTQpjqj+ + 7pQIav6n/wq4lY30mIbYWxrki/c+oBMvqRLhXw921d30l6FVAW3xxAdHD4ivLGWahAej + BKFvzyGSeNq+z7BnlLXInNoPj7Il2PBtEz6w0dgQV++3DMmvbaprCnCQUaSyDeOAwLwR + l+dzEhXz9Oc65b58D9+IQvRk1QQTMMPA6QEQYYS8zqPzMJr2u9LaOO9Z/cSw0DdKDxKp + tA4g==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@chase.com header.s=d4815 header.b=gHcZ2j7g; + spf=pass (google.com: domain of no.reply.alerts.09@chase.com designates 146.143.72.25 as permitted sender) smtp.mailfrom=no.reply.alerts.09@chase.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chase.com +Return-Path: +Received: from vsin80p3234.jpmchase.com (vsin80p3234.jpmchase.com. [146.143.72.25]) + by mx.google.com with ESMTPS id d75a77b69052e-4a435886637si159823641cf.98.2025.06.04.12.43.12 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 04 Jun 2025 12:43:12 -0700 (PDT) +Received-SPF: pass (google.com: domain of no.reply.alerts.09@chase.com designates 146.143.72.25 as permitted sender) client-ip=146.143.72.25; +Authentication-Results: mx.google.com; + dkim=pass header.i=@chase.com header.s=d4815 header.b=gHcZ2j7g; + spf=pass (google.com: domain of no.reply.alerts.09@chase.com designates 146.143.72.25 as permitted sender) smtp.mailfrom=no.reply.alerts.09@chase.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chase.com +Received: from pps.filterd (vsin80p3234.dmz.us.jpmchase.net [127.0.0.1]) by vsin80p3234.jpmchase.com (8.18.1.2/8.18.1.2) with ESMTP id 554JehTC009711 for ; Wed, 4 Jun 2025 19:43:11 GMT +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chase.com; h=content-transfer-encoding : content-type : date : from : message-id : mime-version : subject : to; s=d4815; bh=rF8v8eIeIYAhxeF3fale6PXDnNUzP2v6MrVz5J+kDO4=; b=gHcZ2j7g3sPVIuyjtV46AuRgSrHoMkqrGuqNs8KbFuiLqjnHFvArirYP4wyLDfjjbuva 3/UHHLjS9KJPMBMnpheaduJpqpISIzTPWZR+t0sOWtnYHBBryuQFqnAlwyyVt8Iu3/lw z4loKQLPd/t2pD4p1qiZLRwftLpA/mKnMAcl2khr7GTHIo8/KP3B0r29yh/w+KNs4IKC a8hQ92Chtq2Sa+naj5ucg+rWsQWrPvb/Mxl8JOrC/uHJ7NQqmeTWxsLkKYI4LdiUCTKn 8PO+EzFJPLxoY+0cbeAzsrjPok6vyjoVB/K2WVaHUKwkloEw2KX3whb+VJoH7aRQbjhH 6w== +Received: from vsin53p7503.nanw.jpmchase.net ([169.72.103.155]) by vsin80p3234.dmz.us.jpmchase.net (PPS) with ESMTPS id 472efftmp5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 04 Jun 2025 19:43:11 +0000 +Received: from iaasn00692069.nane.jpmchase.net (iaasn00692069.nane.jpmchase.net [169.101.108.220]) + by vsin53p7503.nanw.jpmchase.net + with ESMTP id 554JhA4n017167 + for ; Wed, 4 Jun 2025 19:43:11 GMT +Date: Wed, 4 Jun 2025 19:43:10 +0000 (UTC) +From: Chase +To: breellocaldev@gmail.com +Message-ID: <1107486429.1219861.1749066190799.JavaMail.webuser@iaasn00692069> +Subject: You made an online, phone, or mail transaction with DD *KLUCKSKRISPYCHIC +MIME-Version: 1.0 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable +NOTIFICATION-ID: CREDIT_REALTIME_AUTH-48e9c860b8465de975777f4fb83dd401b6344dbc8bda5e349afcf1b90dcfaca7-ver3-95-941c9e20-41c8-3b3c-aefd-f27755b09008 +RETRY-COUNT: 0 + + + + + + +See more details about your transaction. + + + + + + + + + +
+ +
+ + + + +
3D""/ + + + + + + +
+ +
See more details about your transaction.
+ + + +
 ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌  ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌  ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; 
+ + + + + + + + +
+ + + +
3D"Chase
+
+ + + +
Transaction alert
+ + + +
+ + + + +
3D""= +You made an online, phone, or mail transaction
3D""/
+ + + + + + + + + + + + + +
3D""/ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + +
AccountChase Fr= +eedom Unlimited Visa (...5876)
+ + + + +
Date= +Jun 4, 2025 at 3:43 PM ET
+ + + + +
MerchantDD *KLUC= +KSKRISPYCHIC
+ + + + +
Amount= +$18.17
Let us monitor where you saved = +your card so you don't have to + with this free, easy and secure tool. Get started.
+
+ + + +
+ + + +
Review account
Securely access your accounts with = +the Chase Mobile® app or chase.com.
+ + + +
About this message
+
+ Chase Mobile® app is available for se= +lect mobile devices. Message and data rates may apply.
+
+ This service email was sent based on your ale= +rt settings. Use the Chase Mobile app or visit chase.com/alerts to view or manage your settings.
+
+ Chase cannot guarantee the delivery of alerts= + and notifications. Wireless or internet service provider outages or other = +circumstances could delay them. You can always check chase.com or the Chase Mobile app for the status of your accounts including= + your latest account balances and transaction details.
+
+ To protect your personal information, please = +don't reply to this message. Chase won't ask for confidential information i= +n an email.
+
+ If you have concerns about the authenticity o= +f this message or have questions about your account visit chase.com= +/CustomerService for ways to contact us.
+
+ Your privacy is important to us. See our onli= +ne Security Center to learn how to protect your infor= +mation.
+
+ © 2025 JPMorgan Chase & Co.
+ 3D""/ + + + + + + + + + + + diff --git a/testdata/chase.202506.txt b/testdata/chase.202506.txt new file mode 100644 index 0000000..991c4d8 --- /dev/null +++ b/testdata/chase.202506.txt @@ -0,0 +1,460 @@ +Delivered-To: breellocaldev@gmail.com +Received: by 2002:a05:6022:9201:b0:72:1e7d:3888 with SMTP id da1csp605545lab; + Thu, 5 Jun 2025 19:07:07 -0700 (PDT) +X-Google-Smtp-Source: AGHT+IE+moNfFhXJTJvvdmPs/w/Vts7d+VkwUju2TbMUnkpSCDhDLZxYSC6SVeKH9qQ26rMWYzr4 +X-Received: by 2002:a05:620a:1a23:b0:7d0:9ffd:4240 with SMTP id af79cd13be357-7d229933921mr325162385a.55.1749175627255; + Thu, 05 Jun 2025 19:07:07 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1749175627; cv=none; + d=google.com; s=arc-20240605; + b=SfoZtzKcm9L5kaOTQKOF8wEN8vAPSa+H38CyuvZJYmO4kzMB1yRKQOAilXThduLFbT + 9NrbZjM+0mIbHVQm/lF0NSKV04UBMFkxAUBATsXNO69RLCxtO5RrxvZYn2L49thzuhbT + usSuj7Im6vZ+tz5ze4WJGGHawDcnqnKgEVnm848sKo8woBtXElDMo6nryqN7CuuovvWW + MptLzwgU612lBpahTHfNYNqws7PsTqbC4wfhMoqnkcxfjrC9m47MgzywL3QRlLhPX2kV + i8wOpbS+K+erFfNlzZV0FiUbiY8A/K6o2fcBaiNkXvuLximJiOAHTmxws24i4TMl2SJi + bGIw== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; + h=retry-count:notification-id:content-transfer-encoding:mime-version + :subject:message-id:to:from:date:dkim-signature; + bh=lnABD7nCflWxnAXhTOyo6zRvYYLTdV0caaqTQPlvs7A=; + fh=lrt9myTdNYNEckm/XjduC9YuGfYr3v7r45vYTr/7vKM=; + b=f5s9zvAULbp6Qu4JmCkGMNAAeSRlFlj+jLMCr1q8H2XbW/fh8MYdmocgy19QABq9BY + kBJHlV2UA1bbodmtJlBWmFymJo8FAzm7eUoepJ4CWWctm17xhxbJ6uO6judb9xPKxA1I + 57XXLQMSighE3qYBN9vnPyk0lgkN7zP/Cu/TV4fr6zXzdIBQKBv5tr93EvUdlt9S/MbL + rU1xeiFenksejp9Bhfd5h1IzYDb8y4/rB7558x1TCxo6MaIfZpR94f554H8/kjivTQMV + d/oPCSKsqcpEfaCRbOSm1V6e4G9HOzmOpTrGL8GFUF1/df2Z2gmSPYUnC5gJljSBiQVz + UR/Q==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@chase.com header.s=d4815 header.b=LdKPsfJ6; + spf=pass (google.com: domain of no.reply.alerts.11@chase.com designates 146.143.136.25 as permitted sender) smtp.mailfrom=no.reply.alerts.11@chase.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chase.com +Return-Path: +Received: from vsin80p3228.jpmchase.com (vsin80p3228.jpmchase.com. [146.143.136.25]) + by mx.google.com with ESMTPS id af79cd13be357-7d25a5f0fa7si79799685a.266.2025.06.05.19.07.07 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Thu, 05 Jun 2025 19:07:07 -0700 (PDT) +Received-SPF: pass (google.com: domain of no.reply.alerts.11@chase.com designates 146.143.136.25 as permitted sender) client-ip=146.143.136.25; +Authentication-Results: mx.google.com; + dkim=pass header.i=@chase.com header.s=d4815 header.b=LdKPsfJ6; + spf=pass (google.com: domain of no.reply.alerts.11@chase.com designates 146.143.136.25 as permitted sender) smtp.mailfrom=no.reply.alerts.11@chase.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chase.com +Received: from pps.filterd (vsin80p3228.dmz.us.jpmchase.net [127.0.0.1]) by vsin80p3228.jpmchase.com (8.18.1.2/8.18.1.2) with ESMTP id 555Nje8s003429 for ; Fri, 6 Jun 2025 02:07:06 GMT +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chase.com; h=content-transfer-encoding : content-type : date : from : message-id : mime-version : subject : to; s=d4815; bh=lnABD7nCflWxnAXhTOyo6zRvYYLTdV0caaqTQPlvs7A=; b=LdKPsfJ6BvS0A55LRUSug3cAoDccuMxnqIdO4fmxSvJYXpgmhAEbyOHwrrq0OZOFr8XC TeMVIfDxg1P3pfUZHvtgm2QKERByVDGfSv+kiII9yIj0bpbt+6//REssh5RyjxKbCaU/ iL8XHeRmetjBbiqhoj8A4b9NN3wgt25QtFRzemuiGUa78CtX+fqTL6KJOlygtXv7otNB Ci3X1JWdv/hb7t0PVplmKmABVPuVAxdiUeZWCiBbgxq8xCYSK5YTZasqF4uoro0u1q8K BhqZsx/Yd8HVO9Y1PstG+04XGhz1dbJk2WXKEfa7IhLU9eHrov3nqdukTxH6kACj9DAs 1A== +Received: from vsin52p7465.nanw.jpmchase.net ([169.74.48.181]) by vsin80p3228.dmz.us.jpmchase.net (PPS) with ESMTPS id 470cwruea9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 06 Jun 2025 02:07:06 +0000 +Received: from iaasn00692068.nane.jpmchase.net (iaasn00692068.nane.jpmchase.net [169.101.122.220]) + by vsin52p7465.nanw.jpmchase.net + with ESMTP id 5562753I004398 + for ; Fri, 6 Jun 2025 02:07:05 GMT +Date: Fri, 6 Jun 2025 02:07:05 +0000 (UTC) +From: Chase +To: breellocaldev@gmail.com +Message-ID: <1155623531.3989104.1749175625501.JavaMail.webuser@iaasn00692068> +Subject: You made a $3.42 transaction with Nintendo CB141137080 +MIME-Version: 1.0 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable +NOTIFICATION-ID: CREDIT_REALTIME_AUTH-770c6a3a398615aa3e43ca933e45e0d7505968eebcc33b814c913513bf149e99-ver3-3-941c9e20-41c8-3b3c-aefd-f27755b09008 +RETRY-COUNT: 0 + + + + + + +This transaction is above the level you set, see more here. + + + + + + + + + + + + + =20 +
+ +
+ + + + + +
3D""/ + + + +
+ +
This transaction is above the level you set, see more here.= +
+ + + +
 ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌  ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌  ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; ‌ ‌ ‌ ‌ ‌ ‌&= +nbsp;‌ ‌ ‌ ‌ ‌ ‌&nbs= +p;‌ ‌ ‌ ‌ ‌ ‌ &= +zwnj; ‌ ‌ ‌ ‌ ‌ &zwn= +j; 
+ + + + + + + + + + + + + +
+ + + +
3D"Chase
+ + + +
+ + + +
Transaction alert
+ + + +
+ + + + + +
3D""= +You made a $3.42 transaction
3D""/
+ + + + + +
3D""/ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + +
AccountChase Fr= +eedom Unlimited Visa (...5876)
+ + + + +
Date= +Jun 5, 2025 at 10:07 PM ET
+ + + + +
MerchantNintendo= + CB141137080
+ + + +
Amount$3.42 +
You are receiving this alert beca= +use your transaction was more than the $0.00 level you set. You can visit o= +ur Resource Center anytime to help answer yo= +ur questions or manage your account.
+ + + +
Review account
Securely access your accounts with = +the Chase Mobile® app or chase.com.
+ + + +
About this message
+
+ Chase Mobile®=C2=A0app is available f= +or select mobile devices. Message and data rates may apply.
+
+ This service email was sent based on your ale= +rt settings. Use the Chase Mobile app or visit chase.com/alerts to view or manage your settings.
+
+ Chase cannot guarantee the delivery of alerts= + and notifications.=C2=A0Wireless or internet service provider outages or o= +ther circumstances could delay them. You can always check chase.com or the Chase Mobile=C2=A0app for the status of your accounts= + including your latest account balances and transaction details.=C2=A0
+
+ To protect your personal information, please = +don't reply to this message. Chase won't ask for confidential information i= +n an email.
+
+ If you have concerns about the authenticity o= +f this message or have questions about your account visit
chase.com= +/CustomerService for ways to contact us.
+
+ Your privacy is important to us. See our onli= +ne Security Center to learn how to protect your infor= +mation.
+
+ © 2025 JPMorgan Chase & Co.
3D""/
+ + + + +