how can i send in-body attached images in a mail using python?
I found this: http://docs.python.org/library/email-examples.html but it has not an example with images.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at the big example of "how to send the entire contents of a directory as an email message". The image in the file
fpis converted into the message partmsghere:and then the message part is attached to the outer message here:
If you want the image to appear inline rather than as an attachment, you should set its
Content-Dispositiontoinlineinstead ofattachment.(If you want to create HTML messages that display attached images, then you need to use the
multipart/relatedMIME type defined in RFC 2387. Ask if you need help with this.)