<% if mail.subject %> <%= h mail.subject %> <% end %>
From:
<%= h from %>
<% unless sender.empty? %>
Sender:
<%= h sender %>
<% end %> <% unless reply_to.empty? %>
Reply-To:
<%= h reply_to %>
<% end %> <% if mail.subject %>
Subject:
<%= h mail.subject %>
<% end %>
Date:
<%= Time.now.strftime("%b %e, %Y %I:%M:%S %p %Z") %>
<% unless to.empty? %>
To:
<%= h to %>
<% end %> <% unless cc.empty? %>
CC:
<%= h cc %>
<% end %> <% unless bcc.empty? %>
BCC:
<%= h bcc %>
<% end %> <% if @attachments.any? %>
Attachments:
<% @attachments.each do |filename, path| %> <%= filename %>  <% end %>
<% end %>
<% if mail.multipart? %>

<% if type == "plain" && mail.html_part %> View HTML version <% elsif type == "rich" && mail.text_part %> View plain text version <% end %>

<% end %>
<% if type == "plain" %>
<%= auto_link(h(body)) %>
<% else %> <% end %>