text/html; vimprobtab.sh %s &; test=test -n "$DISPLAY"; needsterminal;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
The first entry tests that X is running, and if it is, it hands the file to vimprobable. The default, however, is determined by the copiousoutput tag. So, in mutt it is just a matter of hitting v to view the attached HTML and then m to send it to mailcap
J. Almeida, and A. Simões. XATA 2006 --- 4ª Conferência Nacional em XML, Aplicações e Tecnologias Aplicadas, page 307--314. Portalegre, ESTGP, (Fev. 2006)