A script that is correctly embedding inline images in HTML emails, is also adding the images as attachments. How can I eliminate this second copy of each image?
# Attach Any Images
images = '''/Users/me/Desktop/RKw.jpeg\n/Users/me/Desktop/logo.png'''.splitlines()
I=1
for image in images:
# print 'Image',i,': ',image,'\n'
fp = open(image, 'rb')
msgImage = MIMEImage(fp.read())
fp.close()
# Define the image's ID as referenced above
msgImage.add_header('Content-ID', '<image'+str(i)+'>')
msg.attach(msgImage)
I+=1