mat-sz / letterparser

✉️ Isomorphic e-mail parser (with MIME support) written in TypeScript.
BSD 3-Clause Clear License
34 stars 4 forks source link

Multipart type lacking boundary at line 1 #9

Closed avigoldman closed 3 years ago

avigoldman commented 3 years ago

While looking for an example of #8 I came across this issue.

I get the error Error: Multipart type lacking boundary at line 1 when parsing this email.

var letterparser = require("letterparser")

letterparser.extract(`MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=mk-c744386e165c44ecbb696782a4f930f1; charset=UTF-8

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

Hey, glad you're checking out Buttondown :)

Please let me know if you need any help getting set up, or have any questio=
ns or
feature requests!  I'd be more than happy to help =E2=80=94 I also offer co=
ncierge
onboarding, so if you need any help migrating back issues or existing
subscribers from Mailchimp/Tinyletter/whatever, I'd be happy to do that
free of charge.

Some stuff coming down the pipeline in the next month or so:

   - A new, cleaner writing interface
   - Improved accessibility
   - Internationalization

Also, if you wanna keep up to date with new features, feel free to [sign up=
 for our newsletter](https://newsletter.buttondown.email).

---

If you're interested in supporting Buttondown's development, please conside=
r:

- Signing up for our premium newsletter, [Weeknotes](https://weeknotes.butt=
ondown.email), for $4/month.
- Upgrading to **Buttondown for Professionals** for $29/month, which gives =
you access to custom domain support,
  custom URLs, removed branding, [and more](https://buttondown.email/pricin=
g).

(Don't worry, this is exactly the _only_ time I'll be obnoxious and ask for=
 money.)

---

Have a great rest of your day, and don't hesitate to reach out!

(Seriously, replies go straight to my inbox, and I love getting email.)

=E2=80=94 Justin from Buttondown

--mk-c744386e165c44ecbb696782a4f930f1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p>Hey, glad you're checking out Buttondown :)</p>
<p>Please let me know if you need any help getting set up, or have any ques=
tions or
feature requests!  I'd be more than happy to help =E2=80=94 I also offer co=
ncierge
onboarding, so if you need any help migrating back issues or existing
subscribers from Mailchimp/Tinyletter/whatever, I'd be happy to do that
free of charge.</p>
<p>Some stuff coming down the pipeline in the next month or so:</p>
<ul>
<li>A new, cleaner writing interface</li>
<li>Improved accessibility</li>
<li>Internationalization</li>
</ul>
<p>Also, if you wanna keep up to date with new features, feel free to <a hr=
ef=3D"https://click.pstmrk.it/2s/newsletter.buttondown.email/nIZRcCEN/bP1H/=
xUofLUDTvI">sign up for our newsletter</a>.</p>
<hr />
<p>If you're interested in supporting Buttondown's development, please cons=
ider:</p>
<ul>
<li>Signing up for our premium newsletter, <a href=3D"https://click.pstmrk.=
it/2s/weeknotes.buttondown.email/nYZRcCEN/bP1H/jcp5Gv4YsO">Weeknotes</a>, f=
or $4/month.</li>
<li>Upgrading to <strong>Buttondown for Professionals</strong> for $29/mont=
h, which gives you access to custom domain support,
  custom URLs, removed branding, <a href=3D"https://click.pstmrk.it/2s/butt=
ondown.email%2Fpricing/noZRcCEN/bP1H/blpKM8YX7W">and more</a>.</li>
</ul>
<p>(Don't worry, this is exactly the <em>only</em> time I'll be obnoxious a=
nd ask for money.)</p>
<hr />
<p>Have a great rest of your day, and don't hesitate to reach out!</p>
<p>(Seriously, replies go straight to my inbox, and I love getting email.)<=
/p>
<p>=E2=80=94 Justin from Buttondown</p><img src=3D"https://ea.pstmrk.it/ope=
n/v3_P-aeGHPIISH2BUXSOKKE4BZp-HanwtEbCgvz_6SycY51mHCcxUHOM85uyh6H9kTAY83tF7=
FcGzesFhWcsoQUxX_bkz657r-Mu7gf4s-H0h0ll32WCOvCfka8Z9HK28lEoeZ4rlqXLYj47t1rs=
F9NuM9DIzqXc-Ec4jIHY1Rzi_I3h0MFf0aGpRRrbnHrEuwtmkh-qj9HA1tE0rAa_RApixCXRjIt=
dTJVD00bhrsDEKw-Jv1WDsFIgAFS4ILlOpDagKNMk8GQ4mlvMN61Wh-irfULUNzsX2WvTI9fLy4=
8eRfLTkUPDzaT7uwbQmRGND9u4Ci2p9K4EHYw3sVp_flfID3Tr0oF-66UTW5JsoEc1xGihmDi9-=
XCyInt-k3dyb7thdztb9vlFYiTmPIyBj_dRkZe4o6SuV6wBcPeeL6V6vupwRITgKjS-otoDKWWj=
dbKkGdrktwpA97et4monhRmNQ" width=3D"1" height=3D"1" border=3D"0" alt=3D"" /=
>
--mk-c744386e165c44ecbb696782a4f930f1--`)
mat-sz commented 3 years ago

Thank you for your report, the issue has been resolved in 41658e0 and the release will be made soon.

avigoldman commented 3 years ago

Amazing, thank you!

mat-sz commented 3 years ago

Released with 0.0.8.