Skip to content Skip to sidebar Skip to footer

How Can I Send Inline Images In Email With Python/django?

I'm trying to send an email with an inline image using Python/Django. Here is the code showing how I am doing it. It's still in development. So all it is meant to do for now is sen

Solution 1:

It looks like you have:

multipart/related
-> text/html-> image/jpeg

I've also had trouble in the past sending email with the top part being multipart/related. Try this instead:

multipart/mixed
-> multipart/related--> text/html--> image/jpeg

Also, make sure and set the disposition on the image like this:

img.add_header("Content-Disposition", "inline", filename="myimage")

Post a Comment for "How Can I Send Inline Images In Email With Python/django?"