Rails converts html email to text message

Given the html email message, is there any way to convert it to a text version? I do e-mail and notice that sometimes emails do not include the text version, especially with Blackberry devices.

thank

+5
source share
4 answers

Maybe something is missing for me, but you could not just take the HTML message and run ActionView::Helpers::SanitizeHelper#strip_tagsover it?

http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-strip_tags

+4
source

HTML to Text - , Premailer gem.

premailer = Premailer.new('http://example.com/html_email.html')
premailer.to_plain_text

, , ,

+6

, , Google " html ". :

:

Ruby HTML - . .

http://www.chipstips.com/?p=610

0

All Articles