On Thu, Sep 13, 2007 at 05:46:21PM -0500, Ron Johnson wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 09/13/07 17:36, Richard Lyons wrote: > > This is becoming more of a problem. There is a growing number of firms > > that are incapable of sending out normal emails. They insist on sending > > blank messages with an html attachment only. Of course this is usually > > a sign of spam, and I usually delete such messages without wasting time > > wondering what might be in them. But I do get some messages in this > > form that I want to read, and even keep. > > > > Here is the thought that struck me: could I in principle write a script > > to take such void plus html messages, strip the tags (replacing URLs > > when the href text doesn't have it) and write the bare text back into > > the source email so that I can see it? The html attachment could be left > > in place or discarded, it usually won't matter which. Or would this > > mess up the IMAP or Maildir indexing in some way? > > > > Obviously there are plenty of examples of html-strippers around, but > > generally the output lands up somewhere else, and it would be a great > > help if the missing original message could be inserted so as to be > > viewable while browsing the email folder hierarchy. > > Not a direct answer to your question, but if you are using mutt > under X, then there are html viewers that can hook into mutt.
There are viewers that can hook into Mutt even if you don't run it under X. In .muttrc: auto_view text/html In .mailcap: text/html; w3m -dump -T text/html '%s'; copiousoutput Or: text/html; lynx -dump '%s'; copiousoutput # or something like that. Or use the pipe function to feed it into one of those viewers, for an interactive session. I could be wrong, but I don't think that editing the contents of a message would mess up the indexing (most applications that I know of only index the headers). On the other hand, it might be safest to write it to a new file in the maildir, with a new unique name. -- Benjamin A'Lee <[EMAIL PROTECTED]> http://subvert.org.uk/~bma/ "A fan club is a group of people who tell an actor he's not alone in the way he feels about himself." - Kenneth Williams
signature.asc
Description: Digital signature