muratgozel / MIMEText

RFC-2822, RFC-2045 and RFC-2049 compliant raw email message generator.
https://muratgozel.github.io/MIMEText/
MIT License
82 stars 35 forks source link

fix: mailbox addressing parsing for non whitespace delimited mailbox parts #48

Closed LarsFronius closed 9 months ago

LarsFronius commented 1 year ago

According to the Regex validation inside Mimetext and RFC, a mailbox like LoremIpsum<test@mail.com> is valid.

This however caused a an exception before:

new Mailbox('LoremIpsum<test@mail.com>')

->
Cannot read properties of undefined (reading 'slice')
TypeError: Cannot read properties of undefined (reading 'slice')
    at Mailbox.parse (/Users/larsfronius/git/MIMEText/build/Mailbox.js:36:29)
    at new Mailbox (/Users/larsfronius/git/MIMEText/build/Mailbox.js:9:14)

This is to fix that behaviour.

muratgozel commented 9 months ago

hey, could you please edit the src/Mailbox.ts instead of build/Mailbox.ts? and then i would happily merge this.

muratgozel commented 9 months ago

you also might need to pull the repo again, there was major like updates