India PyCon 2009
Quick wallpaper changer
Load testing with Grinder
Adding namespace to XML
Opera RSS to OPML
« 2003 BMW Z4
» Joy of Python: Self documenting code
I had to do some research on sending rich emails(personally, I think rich emails are annoying) that are HTML encoded, with colors, styles and embedded images. After some looking around, I came up with a python script that parses an HTML file, rewrites it with proper MIME headers, packs it as a multi-part message and mails it.
A tar archive of the script and libraries are available for download (73Kb). It is not perfect and certainly has scope for improvement. However, I’m making it available for download because I think people might find it useful, to extend it to their own needs. You can untar it by tar zxvf compmail-1.0.tgz. This will extract it to a folder named compmail.
These must be bugs with the script since both Yahoo mail and Evolution can display inline images. I’ll solve that later.
Interesting reference: Survey of HTML E-mail clients.
compmail.py
doesn’t take any arguments. It is easy to add that.MyHTMLProcessor.py
assumes all embedded images are in the same folder. This can be augmented to parse more intelligently for getting images in other folders.Today, Barry Warsaw has released an "email" package for Python, which will be included in Python 2.3. Check it out at http://sf.net/projects/mimelib
I'm trying to make contact with Cody who was helping me with implementing use of the Japanese language on the internet. Thanks.
Hmmm... The header of all these pages probably would've made it clear that my name is not Cody. Anyway, I'm not Cody and I've no idea about Japanese language.
I'm actually inclined to think that this is another way to get some email addresses for spamming - may be I'm just being paranoid.
we are writing our own email web based client .We are not able to display HTML messages properly if it has inline images.one thing is to replace all the cid tags with proper image locations.is there any other way to improve performance
Want to have more visitors just visit this site: