Sending Multipart html emails which contain embedded images
问题 I\'ve been playing around with the email module in python but I want to be able to know how to embed images which are included in the html. So for example if the body is something like <img src=\"../path/image.png\"></img> I would like to embed image.png into the email, and the src attribute should be replaced with content-id . Does anybody know how to do this? 回答1: Here is an example I found. Recipe 473810: Send an HTML email with embedded image and plain text alternate: HTML is the method