DusanKasan / parsemail

Simple email parsing for Golang
MIT License
212 stars 138 forks source link

Check for attachments before jumping into switch/case statement #41

Open InsidiousClu opened 2 years ago

InsidiousClu commented 2 years ago

This change includes check of the part of the form for attachment detection, before we jump into the switch/case statement. This gives us ability to extract attachments with mime-type of text/html as well, rather appending that to the html body

agentabstract commented 2 years ago

I was having the problem with text attachments. Attached text files were being stored in the textbody field instead of being in the attachments where they belong. I copied @InsidiousClu changes and now my parsemail library is working perfectly. IMHO this code should be merged into the master branch.