% if email.is_a?(Mail::Message) this_part = email elsif email.length > 0 begin this_part = Mail.new(email) rescue => e %>
An error occured parsing this part of the email: <%= e.message %> <%= e.backtrace.join("\n") %><% end end%> <% unless this_part.nil? %>
<%= this_part.header.inspect %><% if this_part.header['content-type'].to_s =~ /text\/html/i %>
<%= this_part.body %><% end %> <% this_part.parts.each do |part| %> <%= render :partial => 'mail_manager/bounces/email_parts', :locals => {:email => part} %> <% end end %>