[Mutt] save HTML-Mail in a raw text file
by Michael Uplawski from LinuxQuestions.org on (#55JFZ)
Good evening
Let me try to keep this simple. First I tell you what I want, then I tell you what I did and describe the results which, so far, are unsatisfactory. Chances are, you do not understand me anyway... PSE stick to what I note in my subject-line, above: Mutt. This is my mail-client which I use in a terminal-emulator.
What I want
Attached Files


Let me try to keep this simple. First I tell you what I want, then I tell you what I did and describe the results which, so far, are unsatisfactory. Chances are, you do not understand me anyway... PSE stick to what I note in my subject-line, above: Mutt. This is my mail-client which I use in a terminal-emulator.
What I want
I receive HTML-mail and there is a newsletter in HTML that I am particularly interested in. I attach the latest issue to this post with headers and all (be brave, if you want to read the source). This type of mail is displayed in mutt with the help of the w3m text-browser. Here is a screen-shot.What I did
What I dream of is a way to store a readable text-version of such mail in a file.
For the time I tried to pipe the mail through commands, directly from mutt (using the pipe symbol '|') or to convert either the eml-file or only the html-content with html2text or a2ps and ps-filters (which are ghostscript, if I have understood anything).If you know something better
The result is always awful.
I do clearly not know, what I am doing.
While w3m and mutt are a perfect match and display something halfway readable, my attempts appear to fail due to the Content-Transfer-Encoding quoted-printable. I can understand that html2text is not interested in quoted-printable and a2ps will transform what it gets, all encoding and tags intact.
The best that I can come up with is the output from my own tool maillinks", which extracts links (hidden ones, especially) from html-mail and references complete URLs below the text. I used html2text on this result and put it in the attachment maillinks-output.
PSE tell me. But remember : this is about Mutt.Attached Thumbnails
![]() | gmfmail.eml.txt (110.2 KB) |
![]() | maillinks_output.txt (31.1 KB) |