Skip to content

Commit 449d92d

Browse files
committed
Added option to show all headers for mailer previews
1 parent 61fdd53 commit 449d92d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

actionmailer/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Added option to show all headers for mailer previews
2+
3+
*Matt Swanson*
4+
15
* Added ability to download `.eml` file for the email preview.
26

37
*Igor Kasyanchuk*

railties/lib/rails/templates/rails/mailers/email.html.erb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@
125125
</select>
126126
</dd>
127127
<% end %>
128+
129+
<dt>Headers:</dt>
130+
<dd>
131+
<details>
132+
<summary>Show all headers</summary>
133+
<table>
134+
<% @email.header_fields.each do |field| %>
135+
<tr>
136+
<td align="right" style="color: #7f7f7f"><%= field.name %>:</td>
137+
<td><%= field.value %></td>
138+
</tr>
139+
<% end %>
140+
</table>
141+
</details>
142+
</dd>
143+
128144
<dt>EML File:</dt>
129145
<dd><%= link_to "Download", action: :download %></dd>
130146
</dl>

0 commit comments

Comments
 (0)