[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-devel] reading html mails



Excerpts from Ruthard Baudach's message of 2013-07-05 12:32:48 +0200:
> In the last years I'm receiving more and more emails containing only
> html-formatted text and no plain text.
> 
> sup displays these emails as empty mails with an html attachment.
> 
> It would be great if sup was able to distinguish between actual html
> attachments and such deficient mails, and would extract and display
> the text part of these mails.

Hi,

I have a mime-decode hook for exactly this problem. It unfolds html
attachments if there is no plaintext part in an email.

    $ cat mime-decode.rb 
    unless sibling_types.member? "text/plain"
      case content_type
      when "text/html"
       `/usr/bin/elinks -dump '#{filename}'`
      end
    end

Best regards,
Markus
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel