sant0sk1 / tmail_body_extractors
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
635b7ca
| name | age | message | |
|---|---|---|---|
| |
README.md | Sat Feb 21 08:39:40 -0800 2009 | |
| |
test_mails/ | Sat Feb 21 08:34:22 -0800 2009 | |
| |
tmail_mail_extension.rb | Sat Feb 21 08:34:22 -0800 2009 | |
| |
tmail_mail_extension_tests.rb | Sat Feb 21 08:34:22 -0800 2009 |
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
