<% if @email.subject %>- Subject <%= @email.subject %>
<% end %>
<% if @email.from %>- From <%= @email.from.join(', ') %>
<% end %>
<% if @email.to %>- To <%= @email.to.join(', ') %>
<% end %>
<% if @email.cc %>- Cc <%= @email.cc.join(', ') %>
<% end %>
<% if @email.bcc %>- Bcc <%= @email.bcc.join(', ') %>
<% end %>
<% if @email.reply_to %>- Reply to <%= @email.reply_to.join(', ') %>
<% end %>
<% if @email.html_part && @email.text_part %>
<% end %>
<% if @email.html_part || @email.text_part || @email.body.present? %>
<% end %>
<% if @email.has_attachments? %>
- Attachments:
-
<% @email.attachments.each do |attachment| %>
-
<%= icon 'paperclip' %>
<%= link_to attachment.filename, attachment_maily_email_path(mailer: params[:mailer], email: params[:email], attachment: attachment.filename) %>
<% end %>
<% end %>