ceuk / mutt_dotfiles

Dotfiles and some scripts for NeoMutt
GNU General Public License v3.0
62 stars 9 forks source link

HTML render #6

Open dazWiLLiE opened 2 years ago

dazWiLLiE commented 2 years ago

Hi.

I'm not sure if I'm missing something, but most of my html mails look like this:

^H^H^H^H^H D�J� VU? ^H^H^H^H^H Dessa klassiska siluetter är väl beprövade. Det betyder 
  att de skänker en retrokänsla till vilken outfit som helst. Äg retrostilen  
  med en nyutgåva av Gazelle ’91 och fler. _^HU_^HP_^HP_^HT_^H�_^H�_^HC_^HK_^H
_^HR_^HE_^HT_^HR_^HO_^H      
  _^H[_^Ha_^Hr_^Hr_^Ho_^Hw_^H]_^H _^H _^H[_^Ha_^Hr_^Hr_^Ho_^Hw_^HB_^Hl_^Ha_^Hc_^Hk_^H]_^H
_^H[_^HU_^Hp_^Hp_^Ht_^H�_^H�_^Hc_^Hk_^H _^Hm_^He_^Hr_^H]_^H _^H 
  _^H[_^HU_^Hp_^Hp_^Ht_^H�_^H�_^Hc_^Hk_^H _^Hm_^He_^Hr_^H]_^H
_^H[_^Hi_^Hn_^Hs_^Ht_^Ha_^Hg_^Hr_^Ha_^Hm_^H] _^H[_^Hf_^Ha_^Hc_^He_^Hb_^Ho_^Ho_^Hk_^H]   
  _^H[_^Hy_^Ho_^Hu_^Ht_^Hu_^Hb_^He_^H] _^H[_^Ht_^Hw_^Hi_^Ht_^Ht_^He_^Hr_^H]
_^H[_^Hp_^Hi_^Hn_^Ht_^He_^Hr_^He_^Hs_^Ht_^H]                
  _^HS_^He_^Hk_^Hr_^He_^Ht_^He_^Hs_^Hs_^Hm_^He_^Hd_^Hd_^He_^Hl_^Ha_^Hn_^Hd_^He            

  _^HS_^Hu_^Hp_^Hp_^Ho_^Hr_^Ht _^HM_^Hi_^Ht_^Ht_^H _^Hk_^Ho_^Hn_^Ht_^Ho
_^HA_^Hv_^Hs_^Hl_^Hu_^Ht_^Ha_^H  
  _^Hp_^Hr_^He_^Hn_^Hu_^Hm_^He_^Hr_^Ha_^Ht_^Hi_^Ho_^Hn
_^Ha_^Hd_^Hi_^Hd_^Ha_^Hs_^H._^Hs_^He © 2022

I'm on arch, and installed html2text-with-utf8 from AUR.

Edit: With python-html2text from Community it looks better (non of the _^H[_^Ha_^Hr_^Hr_ stuff), but with links everywhere. Is that the best it can look?

ceuk commented 2 years ago

Hey, the beautiful_html_render script is pretty opinionated and doesn't actually look that great for noisy, complex HTML emails. You could try uncommenting the lynx line in the mailcap file - or use elinks which I think is my favourite for general HTML at the moment:

text/html; elinks %s -dump; nametemplate=%s.html; copiousoutput;
coquizen commented 2 years ago

When using either strategies, the content of the email doesn't render despite confirmation of content when checking the raw message. According to the error logs, it states: no text past headers.