diff options
-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"}} |