fix: [#941] separate raw mail text from views - #1491
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1491 +/- ##
==========================================
- Coverage 69.46% 69.46% -0.01%
==========================================
Files 378 378
Lines 29710 29713 +3
==========================================
+ Hits 20639 20640 +1
- Misses 8118 8119 +1
- Partials 953 954 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mail.Content.Textas raw plain-text email body content.HtmlViewand addTextViewfor plain-text templates.HtmlViewandTextViewinto their matching email body parts.Closes goravel/goravel#941
Why
mail.Content.Textpreviously behaved like a template path, so sending raw text such as"Hello"attempted to render a template namedHello. The content API now separates raw bodies from template views, so plain text can be sent directly while template users have explicit HTML and text view fields.Applications that render templates should use
HtmlViewandTextView, which makes multipart email behavior explicit and avoids overloadingTextwith two meanings.