- Actions
- <%= button_to "Delete", message_path(@email.message_id), method: :delete, data: {turbo_confirm: "Are you sure?"} %>
<% if Array(@email.from) != Array(@email.smtp_envelope_from) %>
- SMTP-From:
- <%= @email.smtp_envelope_from %>
<% end %>
<% if Set[*@email.to, *@email.cc, *@email.bcc] != Set[*@email.smtp_envelope_to] %>
- SMTP-To:
- <%= @email.smtp_envelope_to.join(", ") %>
<% 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 %>
<% if @email.bcc %>
- BCC:
- <%= @email.header['bcc'] %>
<% end %>
- Date:
- <%= @email.header['date'] || Time.current.rfc2822 %>
- Subject:
- <%= @email.subject %>
<% if @attachments.any? || @inline_attachments.any? %>
- Attachments:
-
<% @attachments.each do |filename, attachment| %>
<%= link_to filename, attachment_url(attachment), download: filename %>
<% end %>
<% if @inline_attachments.any? %>
(Inline: <% @inline_attachments.each do |filename, attachment| %>
<%= link_to filename, attachment_url(attachment), download: filename %><% end %>)
<% end %>
<% end %>
- Format:
<% if @email.html_part && @email.text_part %>
-
<% elsif @part %>
- <%= @part.mime_type == 'text/html' ? 'HTML email' : 'plain-text email' %>
<% else %>
<% end %>
<% if I18n.available_locales.count > 1 %>
- Locale:
-
<% end %>
<% unless @email.header_fields.nil? || @email.header_fields.empty? %>
- Headers:
-
Show all headers
<% @email.header_fields.each do |field| %>
<%= field.name %>: |
<%= field.value %> |
<% end %>
<% end %>
- EML File:
- <%= Mailbin.location_for(params[:id]) %>
<% if @part && @part.mime_type %>
<% else %>
You are trying to preview an email that does not have any content.
<% end %>