-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Issue 451 #454
Fixes Issue 451 #454
Conversation
Codecov Report
@@ Coverage Diff @@
## master #454 +/- ##
=========================================
- Coverage 88.26% 88.1% -0.17%
=========================================
Files 30 30
Lines 929 933 +4
Branches 112 114 +2
=========================================
+ Hits 820 822 +2
- Misses 53 54 +1
- Partials 56 57 +1
Continue to review full report at Codecov.
|
sendgrid/helpers/mail/mail.py
Outdated
self._contents.append(content) | ||
|
||
#Fix for issue-451: text content should be before html content | ||
if content._type == "text/plain": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen here if someone provides only html content?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hugomallinson who reported the issue mentioned that it was only when there is both plain text and HTML content and the HTML content is specified first.
If there's only HTML content, there shouldn't be any error and order wouldn't matter/make a difference
Hello @dsouzarc, |
Fixes #451 with test cases
Issue Summary
Requests to send mail with both plain text and HTML content fail if the HTML content is specified first.
@mbernier edited the link to the issue