Skip to content

Commit

Permalink
Added option to show all headers for mailer previews
Browse files Browse the repository at this point in the history
  • Loading branch information
swanson committed Feb 8, 2023
1 parent 61fdd53 commit 449d92d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actionmailer/CHANGELOG.md
@@ -1,3 +1,7 @@
* Added option to show all headers for mailer previews

*Matt Swanson*

* Added ability to download `.eml` file for the email preview.

*Igor Kasyanchuk*
Expand Down
16 changes: 16 additions & 0 deletions railties/lib/rails/templates/rails/mailers/email.html.erb
Expand Up @@ -125,6 +125,22 @@
</select>
</dd>
<% end %>

<dt>Headers:</dt>
<dd>
<details>
<summary>Show all headers</summary>
<table>
<% @email.header_fields.each do |field| %>
<tr>
<td align="right" style="color: #7f7f7f"><%= field.name %>:</td>
<td><%= field.value %></td>
</tr>
<% end %>
</table>
</details>
</dd>

<dt>EML File:</dt>
<dd><%= link_to "Download", action: :download %></dd>
</dl>
Expand Down

0 comments on commit 449d92d

Please sign in to comment.