I am looking for a library which can take a raw email message and convert it to appropriate html in python.
help will be appreciated
I am looking for a library which can take a raw email message and convert it to appropriate html in python.
help will be appreciated
Use the MIME package included in email
http://docs.python.org/library/email Here some examples http://docs.python.org/library/email-examples.html
You have two choices,
If the email has a HTML payload, you can use that - maybe put a simple template together to wrap whatever metadata fields (from, to, subject, date etc.) you need.
If there is no html body, you can just wrap it in a <pre></pre>
- use the same template.
Sorry, I can't name a library - there is not a lot to do.
What you can do is identify an open source app that handles email in a way you like it and take a look at the code. like this ppwm at sourceforge