wneessen / go-mail

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

#81: Fix error handling in body writer #82

Closed wneessen closed 1 year ago

wneessen commented 1 year ago

The error handling in the msgWriter.writeBody() method was not working properly. We basically overwrote the mw.err with nil if the function that followed after a failed write attempt was successful again

This patch fixes #81

codecov-commenter commented 1 year ago

Codecov Report

Merging #82 (47eb7b5) into main (1ff87db) will decrease coverage by 0.88%. The diff coverage is 52.00%.

@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
- Coverage   83.85%   82.96%   -0.89%     
==========================================
  Files          13       13              
  Lines        1381     1397      +16     
==========================================
+ Hits         1158     1159       +1     
- Misses        153      163      +10     
- Partials       70       75       +5     
Impacted Files Coverage Δ
msgwriter.go 86.08% <52.00%> (-4.57%) :arrow_down:
client.go 73.58% <0.00%> (-0.81%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more