jordan-wright / email

Robust and flexible email library for Go
MIT License
2.61k stars 324 forks source link

Missing MIMe headers with NewEmailFromReader #139

Open tarmo-randma opened 3 years ago

tarmo-randma commented 3 years ago

In the latest master version (943e75fe5223047b345337ea74d5951d19d229ed) when e-mails are created with NewEmailFromReader and they contain attachments, the attachments will have empty MIME headers. This is due to commit b84218f6af87ca49ed7465d40545587bd94b379f on Dec 30, 2020 which resolved a different issue. The MIME headers were never covered by a Unit test, so this was not picked up.

The old removed implementation however was also buggy as it set the Content-Id header of the attachment always to the file name. This is incorrect behavior as Content-Id can have a different value and should be read directly from the MIME header.

tarmo-randma commented 3 years ago

I have created PR #140 that will resolve this issue

gonejack commented 3 years ago

Hi, any release plan about this fix? My project https://github.com/gonejack/email-to-epub is effected by this bug currently.