# File lib/vmail/message_formatter.rb, line 47 def format_part(part) if part && part.respond_to?(:header) case part.header["Content-Type"].to_s when /text\/html/ format_html_body(part) when /text\/plain/ format_text_body(part) when /message\/rfc/ m = Mail.new(part.body.decoded) process_body(m) else # just format_text on it anyway format_text_body(part) end else "[NO BODY]" end rescue puts $! "[error:] #{$!}" end