wneessen / go-mail

📧 Easy to use, yet comprehensive library for sending mails with Go
https://go-mail.dev
MIT License
567 stars 44 forks source link

Parsing rfc5322 example A11 fails #271

Closed Henning1 closed 1 month ago

Henning1 commented 1 month ago

Description

Hi,

I tried to parse rfc5322 example A11 with gomail.EMLToMsgFromString(..) and the method returned the errror failed to parse EML contents: failed to parse EML body parts: failed to extract content type: mime: no media typ.

Are there known limitations to the parser I am not aware of or is this a bug?

Best, Henning

To Reproduce

  1. Get example message A1.1 from rfc
  2. Parse it with gomail.EMLToMsgFromString(..)
  3. Inspect error message

Expected behaviour

Should parse successfully

Screenshots

No response

Attempted Fixes

No response

Additional context

No response

wneessen commented 1 month ago

Thanks for the report @Henning1. The EML parser is fairly new and probably has some cases I didn't consider. This is likely an oversight. I'll have a look at the example and provide a fix soon.