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

Refactor: Handle missing Content-Type as plain text #272

Closed wneessen closed 1 month ago

wneessen commented 1 month ago

Added a new example email and modified tests to include an RFC 5322 format. Refactored the code to handle cases where the Content-Type header is missing by defaulting to plain text (7bit, US-ASCII). Deleted redundant test cases that no longer apply.

This PR closes #271

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.26%. Comparing base (3ca2968) to head (69b1dc2).

Files Patch % Lines
eml.go 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #272 +/- ## ========================================== - Coverage 85.31% 85.26% -0.06% ========================================== Files 25 25 Lines 2070 2076 +6 ========================================== + Hits 1766 1770 +4 - Misses 178 180 +2 Partials 126 126 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.