mirror of
https://github.com/jhillyerd/inbucket.git
synced 2026-01-09 04:31:55 +00:00
Basic HTML email rendering
Messages with a MIME text/html MIME part will now be displayed with an `HTML` button above them that will open another window and render the HTML when clicked. There is no sanitization performed, and inline attachment display is not support. This closes #2
This commit is contained in:
1
app/views/Mailbox/Html.html
Normal file
1
app/views/Mailbox/Html.html
Normal file
@@ -0,0 +1 @@
|
||||
{{.body}}
|
||||
@@ -44,6 +44,12 @@
|
||||
})
|
||||
}
|
||||
|
||||
function htmlView(id) {
|
||||
window.open('/mailbox/html/{{$name}}/' + id, '_blank',
|
||||
'width=800,height=600,' +
|
||||
'menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes')
|
||||
}
|
||||
|
||||
function messageSource(id) {
|
||||
window.open('/mailbox/source/{{$name}}/' + id, '_blank',
|
||||
'width=800,height=600,' +
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<div id="emailActions">
|
||||
<a href="javascript:deleteMessage('{{.message.Id}}');">Delete</a>
|
||||
<a href="javascript:messageSource('{{.message.Id}}');">Source</a>
|
||||
{{if .htmlAvailable}}
|
||||
<a href="javascript:htmlView('{{.message.Id}}');">HTML</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<table id="emailHeader">
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user