Viewing flowed messages
Right now, we display the message text content in a HTML pre which does not do any wrapping, which makes it painful to read on my phone. Most messages nowadays are sent using some type of reflow:
html alternative: the email comes with a MIME alternative to type text/html. We should detect and automatically prefer this alternative to the text one. Of course, we need to filter which HTML tags get passed through and for that we can use xss-santiize (http://hackage.haskell.org/package/xss-sanitize). I think at the start we should restrict even more than xss-santize does, perhaps only div and p (which is all flow should need)
format=flowed: actually a grep of my email showed not that many flowed messages. Here we have a slight problem: the format=flowed header does not appear in the notmuch JSON response. We can parse the format=flowed messages ourselves pretty easy and generate HTML p tags, but we need to know the message is flowed. Perhaps we can for now just try parsing every message as flowed and work on getting notmuch to at least return the header in the JSON, although notmuch could also parse it into paragraphs and return them.