{"id":644,"date":"2009-09-18T11:50:00","date_gmt":"2009-09-18T09:50:00","guid":{"rendered":"https:\/\/lisas.de\/~adrian\/posts\/2009-Sep-18-first-text-then-html.html"},"modified":"2026-03-30T22:41:25","modified_gmt":"2026-03-30T20:41:25","slug":"first-text-then-html","status":"publish","type":"post","link":"https:\/\/lisas.de\/luges\/index.php\/2009\/09\/18\/first-text-then-html\/","title":{"rendered":"First Text Then HTML"},"content":{"rendered":"<p>I finally have <a href=\"http:\/\/www.mutt.org\/\">mutt<\/a> configured in such a way that it first tries to display the plain text part of a mail and only the HTML part if there is no plain text available. For years I had mutt configured to display HTML mails using <em>lynx<\/em> but it was displaying the HTML part even if there was plain text available.<\/p>\n<p>To display HTML mails I was using <code>auto_view text\/html<\/code> in my <em>.muttrc<\/em> like it is described everywhere with the following corresponding entry in my <em>.mailcap<\/em>:<\/p>\n<div class=\"highlight\">\n<pre><span><\/span><code>text\/html; lynx -dump %s; copiousoutput; nametemplate=%s.html <\/code><\/pre>\n<\/div>\n<p>The problem with this setup is that it displays the HTML part of a mail even if there is a plain text part available. So I had <code>auto_view text\/html<\/code> disabled for most of the time and edited the configuration file manually to enable it again for the rare cases in which I received a HTML only mail.<\/p>\n<p>But as this is <em>mutt<\/em> and almost everything can be configured I finally searched and found a solution:<\/p>\n<div class=\"highlight\">\n<pre><span><\/span><code>auto_view text\/html alternative_order text\/plain text\/html <\/code><\/pre>\n<\/div>\n<p>If the message has a plain text part and a HTML part <em>mutt<\/em> shows me the plain text part, but if there is only a HTML part available I get the HTML converted to plain text. Exactly what I always wanted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finally have mutt configured in such a way that it first tries to display the plain text part of a mail and only the HTML part if there is no plain text available. For years I had mutt configured to display HTML mails using lynx but it was displaying the HTML part even if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-luges"],"_links":{"self":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts\/644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":5,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"predecessor-version":[{"id":1905,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts\/644\/revisions\/1905"}],"wp:attachment":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}