<% if @email.respond_to?(:smtp_envelope_from) && Array(@email.from) != Array(@email.smtp_envelope_from) %>
- SMTP-From:
- <%= @email.smtp_envelope_from %>
<% end %>
<% if @email.respond_to?(:smtp_envelope_to) && @email.to != @email.smtp_envelope_to %>
- SMTP-To:
- <%= @email.smtp_envelope_to %>
<% end %>
- From:
- <%= @email.header['from'] %>
<% if @email.reply_to %>
- Reply-To:
- <%= @email.header['reply-to'] %>
<% end %>
- To:
- <%= @email.header['to'] %>
<% if @email.cc %>
- CC:
- <%= @email.header['cc'] %>
<% end %>
- Date:
- <%= Time.current.rfc2822 %>
- Subject:
- <%= @email.subject %>
<% unless @email.attachments.nil? || @email.attachments.empty? %>
- Attachments:
-
<%= @email.attachments.map { |a| a.respond_to?(:original_filename) ? a.original_filename : a.filename }.inspect %>
<% end %>
<% if @email.multipart? %>
-
<% end %>