-
I'd like to combine a number of features in Red Mail to create an email report with a series of images by looping through body_params containing image references. I'm facing the obstacle that the image name in body_params has to be referenced as a string which doesnt work when used in the html template itself. If anyone has an idea on how this might be overcome, I'd really appreciate any pointers. Thanks vm,
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This seems an interesting dilemma that I haven't thought of. What is done with the body images (if I remember correctly on top of my head) is that first, CIDs are defined for each of them (Content-IDs) using a function from the email library, they are wrapped with utility class BodyImage that is actually passed to the HTML template using Jinja as "direct" arguments and then the actual image is read/parsed and put as an inline image to the email body. For time being, unfortunately, I cannot think of a convenient solution. I think we could do something about this though. Probably passing the images as an argument called just |
Beta Was this translation helpful? Give feedback.
This seems an interesting dilemma that I haven't thought of. What is done with the body images (if I remember correctly on top of my head) is that first, CIDs are defined for each of them (Content-IDs) using a function from the email library, they are wrapped with utility class BodyImage that is actually passed to the HTML template using Jinja as "direct" arguments and then the actual image is read/parsed and put as an inline image to the email body.
For time being, unfortunately, I cannot think of a convenient solution.
I think we could do something about this though. Probably passing the images as an argument called just
body_images
if one wishes to loop through them, and why not do the…