Popular recipes by darrin massena http://code.activestate.com/recipes/users/1987292/2006-01-29T18:40:36-08:00ActiveState Code RecipesSend an HTML email with embedded image and plain text alternate (Python)
2006-01-29T18:40:36-08:00darrin massenahttp://code.activestate.com/recipes/users/1987292/http://code.activestate.com/recipes/473810-send-an-html-email-with-embedded-image-and-plain-t/
<p style="color: grey">
Python
recipe 473810
by <a href="/recipes/users/1987292/">darrin massena</a>
(<a href="/recipes/tags/network/">network</a>).
</p>
<p>HTML is the method of choice for those wishing to send emails with rich text, layout and graphics. Often it is desirable to embed the graphics within the message so recipients can display the message directly, without further downloads.</p>
<p>Some mail agents don't support HTML or their users prefer to receive plain text messages. Senders of HTML messages should include a plain text message as an alternate for these users.</p>
<p>This recipe sends a short HTML message with a single embedded image and an alternate plain text message.</p>