-
Notifications
You must be signed in to change notification settings - Fork 43
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
Change mimetype to support inline images in thunderbird #144
Conversation
Change the content type from `multipart/mixed` to `multipart/related` so that thunderbird will correctly recognize inline images. Closes #142
Looking good! I think the unit tests need a few minor tweaks to get them to pass. Also, have you had a chance to send a message with an inline attachment from this branch and verified that it looks correct on Thunderbird (and also Gmail)? |
Oops – sorry for missing the testcase. I fixed that now. I have sent emails with this branch to 3 different email accounts I have using both html and markdown templates including inline images. The emails did render as expected in all MUAs tried:
|
Great! Thanks for the thorough check. One last thing: it looks like there are a few outdated comments that need a tweak: $ ag mixed
mailmerge/template_message.py
90: method will create a new `multipart/mixed` message, copy message
131: multipart/mixed
137: top-level `multipart/mixed` message.
189: Attachments are added to the payload of a `multipart/mixed` message.
193: multipart/mixed
202: multipart/mixed |
I'm tagging @seshrs who wrote the original attachments feature. The only exceptional case I can think of is a Markdown message without an inline attachment. It would have this message structure:
Instead of this one:
I tested this in GMail and it seems to work fine. |
Codecov Report
@@ Coverage Diff @@
## develop #144 +/- ##
========================================
Coverage 99.70% 99.70%
========================================
Files 5 5
Lines 344 344
========================================
Hits 343 343
Misses 1 1
Continue to review full report at Codecov.
|
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.
LGTM!
Change the content type from
multipart/mixed
tomultipart/related
sothat thunderbird will correctly recognize inline images.
Closes #142