Skip to content
Advertisement

Embedding image in HTML email using Python

I have been trying to embed images to an email using MIMEImage but even after replicating examples I find online, I keep having the same issue…

Here is the part of the HTML that embeds the image:

JavaScript

This is my Python code:

JavaScript

But, when the email sends, I keep getting the error saying: The linked image cannot be displayed. The file may have been moved, renamed, or deleted.

Screenshot of what the email ends up looking like:

Screenshot of what the email ends up looking like

I have no idea what I am doing wrong…

Thank you!

Advertisement

Answer

I updated the message container and the issue was resolved:

Original:

JavaScript

New:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement