search for: body_as_plain_text

Displaying 1 result from an estimated 1 matches for "body_as_plain_text".

2006 May 25
4
Does TMail support Nested Multipart Messages? (Repost)
...the sample mail. Here is the code to parse it: require File.dirname(__FILE__) + ''/../test_helper'' class TMailTest < Test::Unit::TestCase def test_multiparts assert raw = File.read("sample") assert mail = TMail::Mail.parse (raw) puts "body=!#{body_as_plain_text (mail)}!" end def body_as_plain_text(part) body = '''' if part.multipart? part.parts.each do |subpart| if subpart.content_type == ''text/plain'' and subpart.content_disposition == ''inline''...