diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-03 11:11:49 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-03 11:11:49 +0100 |
commit | 61f2f3e139dbc39618a9764a5b80af61933167da (patch) | |
tree | 647b32e89c3529a14503c36f17662fd6974f9ca5 /public | |
parent | 80eeaeeb1e05b97d1e37e84252962b82322dc9fd (diff) | |
download | alps-61f2f3e139dbc39618a9764a5b80af61933167da.tar.gz alps-61f2f3e139dbc39618a9764a5b80af61933167da.zip |
Print body structure tree
Diffstat (limited to 'public')
-rw-r--r-- | public/message.html | 17 |
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"}} |