Add non-inline images as attachments#226
Add non-inline images as attachments#226skoobasteeve wants to merge 1 commit intokootenpv:masterfrom
Conversation
|
Awesome, thanks a lot for your work! |
There was a problem hiding this comment.
I am actually looking to solve this exact problem and thank you for adding this. (TLDR. For non-tldr, scroll down). [EDIT: I am actually needing to attach an .html file, but not have it rendered, but show in the attachments section]
Small, but important feedback on this PR:
- Can you add a way to wrap this bit of code? I think this functionality should only be enabled with an optional flag passed into the prepare_message() fn.
- All for the sake of backwards-compatibility.
Email formatting is important, depending on the use of this library.
Just to think ahead, those in the opposite camp may have a need for the functionality as it is now. Especially if it is a company footer or such. I can imagine they may depend on the "broken" functionality to maintain their email appearance. etc.
Some people simply prefer having images within their email, esp. if it is important to their branding. Making their customers open an attachment may be a less-desirable business move.
|
Line 118 in 5392343 Probably need to ensure it will acceptably pass under this umbrella. |
|
or maybe needs decoupling to get access to message. I don't know. I'm trying to find a way to access the prepare_message() and it's too encapsulated. I'm getting sucked into this issue, but don't have the time to really break this apart. |
This PR addresses issue #224 by adding an attachment header to images in the
attachmentslist. Images will still display inline ifyagmail.inline()is used.I tested this in the master branch and everything worked as expected, but let me know if this causes any other problems for you. Sample header:
Thank you for all your work!