public
Description: Extends TMail::Mail with instance methods for extracting just html or plaintext from email body.
Homepage:
Clone URL: git://github.com/sant0sk1/tmail_body_extractors.git
name age message
file README.md Sat Feb 21 08:39:40 -0800 2009 cleaned up usage in readme to look nicer on GitHub [sant0sk1]
directory test_mails/ Sat Feb 21 08:34:22 -0800 2009 first git commit [sant0sk1]
file tmail_mail_extension.rb Sat Feb 21 08:34:22 -0800 2009 first git commit [sant0sk1]
file tmail_mail_extension_tests.rb Sat Feb 21 08:34:22 -0800 2009 first git commit [sant0sk1]
README.md

TMail Body Extractors

Notes

Originally authored by Fernando Guillen under the name tmail-html-body-extractor and available on Google Code. I swiped it up and added test-driven method to deliver plaintext only from TMail::Mail object. Released under Apache License 2.0

Usage

require "tmail_mail_extension"

mail = TMail::Mail.parse(source)

mail.body_html   # returns just html if available or nil
mail.body_plain  # returns just plaintext if available or nil