drewr / postal

Clojure email support
MIT License
587 stars 85 forks source link

Body before headers #111

Closed slava92 closed 3 years ago

slava92 commented 3 years ago

Invoking .setText on MimeMessage forcefully sets Content-Type: header to text/plain, overriding original value if it was there. The workaround is to set body text first then add the remaining headers. .setText API Best! Slava

drewr commented 3 years ago

Thank you for the change. I think I understand it, but would you mind updating or adding a test with the scenario you've encountered?

slava92 commented 3 years ago

Good point! Will do.

slava92 commented 3 years ago

I added a unit test for 'make-jmessage'. If you revert my tweak in message.clj, the unit test starts to fail.

drewr commented 3 years ago

I'll go ahead and merge, thanks for the fix @slava92!

slava92 commented 3 years ago

Great. Thanks for the helpful suggestions!