aboutsummaryrefslogtreecommitdiff
path: root/public/message.html
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-03 11:11:49 +0100
committerSimon Ser <contact@emersion.fr>2019-12-03 11:11:49 +0100
commit61f2f3e139dbc39618a9764a5b80af61933167da (patch)
tree647b32e89c3529a14503c36f17662fd6974f9ca5 /public/message.html
parent80eeaeeb1e05b97d1e37e84252962b82322dc9fd (diff)
downloadalps-61f2f3e139dbc39618a9764a5b80af61933167da.tar.gz
alps-61f2f3e139dbc39618a9764a5b80af61933167da.zip
Print body structure tree
Diffstat (limited to 'public/message.html')
-rw-r--r--public/message.html17
1 files changed, 16 insertions, 1 deletions
diff --git a/public/message.html b/public/message.html
index 9cd4a2e..047e78f 100644
--- a/public/message.html
+++ b/public/message.html
@@ -6,6 +6,21 @@
<h2>{{.Message.Envelope.Subject}}</h2>
-<pre>{{.Body}}</pre>
+{{define "message-part"}}
+ {{.MIMEType}}/{{.MIMESubType}}
+ {{if gt (len .Parts) 0}}
+ <ul>
+ {{range .Parts}}
+ <li>{{template "message-part" .}}</li>
+ {{end}}
+ </ul>
+ {{end}}
+{{end}}
+
+{{template "message-part" .Message.BodyStructure}}
+
+{{if .Body}}
+ <pre>{{.Body}}</pre>
+{{end}}
{{template "foot"}}