I cannot get thunderbird to show any embedded images I send in emails via python. It shows small empty boxes in the image and the image underneath the body (not a typical attachment).
the emails are correct in Outlook and Yahoo.
I must be missing a header?
self.msg = MIMEMultipart( )
fp = open( path2img , 'rb')
msgImage = MIMEImage(fp.read())
fp.close()
msgImage.add_header('Content-ID', '<imagename>')
msgImage.add_header('Content-Disposition' , 'inline' , filename='image.png')
msgImage.add_header('Content-Type' , 'image/png')
self.msg.attach(msgImage)
my image source in the email body is:
<img src="cid:imagename">
I have looked everywhere and cannot work out why!! please help.
(my Python might not be great, but good enough for Outlook / Yahoo)
thanks in advance