On 2018-04-10, Yubin Ruan <ablacktsh...@gmail.com> wrote: > Hi, > > Can anyone share some approaches for reading HTML emails. > Currenlty I use w3m: > > text/html; w3m -I %{charset} -T text/html; copiousoutput; > > But sometimes I receive some HTML mails which can not be handled that well by > w3m, so I want to open that html attachment in a browser. How can I switch > between?
I have my mailcap entry set up so that "viewing" an html message uses w3m but "printing" an html message passes it to chromium: $ fgrep text/html ~/.mailcap text/html; w3m -T text/html -dump; copiousoutput; print = chromiumurl %s; $ cat ~/bin/chromiumurl #!/bin/bash URL="$1" test -f "$URL" && URL="file://$URL" expr match "$URL" '.*://.*' >/dev/null || URL="http://$URL" exec chromium "$URL" -- Grant Edwards grant.b.edwards Yow! Am I elected yet? at gmail.com