Popular recipes tagged "meta:requires=email.mimeimage"http://code.activestate.com/recipes/tags/meta:requires=email.mimeimage/2011-06-12T18:38:47-07:00ActiveState Code RecipesSend an HTML email with embedded image and plain text alternate (Python)
2011-06-12T18:38:47-07:00soham vaghelahttp://code.activestate.com/recipes/users/4178285/http://code.activestate.com/recipes/577752-send-an-html-email-with-embedded-image-and-plain-t/
<p style="color: grey">
Python
recipe 577752
by <a href="/recipes/users/4178285/">soham vaghela</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>
Python Gmail script (smtp) (Python)
2011-06-08T20:15:01-07:00jrovegnohttp://code.activestate.com/recipes/users/4170207/http://code.activestate.com/recipes/577690-python-gmail-script-smtp/
<p style="color: grey">
Python
recipe 577690
by <a href="/recipes/users/4170207/">jrovegno</a>
(<a href="/recipes/tags/gmail/">gmail</a>, <a href="/recipes/tags/smtp/">smtp</a>).
Revision 4.
</p>
<p>Referencias:
<a href="http://ideaschile.wordpress.com/2011/05/12/python-gmail-script-smtp/">Python Gmail script (smtp)</a></p>
Send 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>
Compose HTML Mail with embedded images from URL or local file (Python)
2006-02-06T12:10:55-08:00Catalin Constantinhttp://code.activestate.com/recipes/users/2766393/http://code.activestate.com/recipes/473851-compose-html-mail-with-embedded-images-from-url-or/
<p style="color: grey">
Python
recipe 473851
by <a href="/recipes/users/2766393/">Catalin Constantin</a>
.
</p>
<p>The thing about this class is to "build" a mail msg object, automatic, from an URL or a local html file WITH all images included.
The class takes care of the image parsing / downloading / embedding + "cid: ID-here" replacements. The return is a valid MIMEMultipart("related") msg object which can be used to send valid HTML mail.</p>