Monday, December 3, 2012

How to Send Mail in Python

There are several use cases how you can send an email message using Python:
  1. Plain Mail: an email message with plain text or html content.
  2. Mail with Attachment: an email message with attached document.
  3. Alternative Mail Views: you provide a convenient way to email recipients to view your message in plain text or html with optional rich content including images, etc.
Here is an example of alternative email with HTML and image:
Let see how this can be accomplished.