{{template "head.html" .}} {{template "nav.html" .}} {{define "message-part-tree"}} {{/* nested templates can't access the parent's context */}} {{$ = index . 0}} {{with index . 1}} {{if eq $.Part.PathString .PathString}}{{end}} {{.String}} {{if eq $.Part.PathString .PathString}}{{end}} {{if gt (len .Children) 0}} {{end}} {{end}} {{end}}
{{$current := .Mailbox}}
{{$back := printf "%v?page=%v" .Mailbox.URL .MailboxPage}} « Back {{ if and (ne .Mailbox.Name "Archive") (ne .Mailbox.Name "Drafts") (ne .Mailbox.Name "Sent") }}
{{ end }} {{ if and (ne .Mailbox.Name "INBOX") (ne .Mailbox.Name "Sent") (ne .Mailbox.Name "Drafts") }}
{{ end }} {{ if or (eq .Mailbox.Name "INBOX") (eq .Mailbox.Name "Trash") }}
{{ end }} {{ if or (eq .Mailbox.Name "Trash") (eq .Mailbox.Name "Junk") }}
{{ else }}
{{ end }}
{{if .Message.HasFlag "\\Draft"}} Edit draft {{else}} Reply Forward {{end}}
{{if .Message.Envelope.Cc}} {{end}} {{if .Message.Envelope.Bcc}} {{ end }}

{{if .Message.Envelope.Subject}} {{.Message.Envelope.Subject}} {{else}} (No subject) {{end}}

From: {{template "addr-list" .Message.Envelope.From}}
Date: {{.Message.Envelope.Date | formatdate}}
To:{{template "addr-list" .Message.Envelope.To}}
Cc:{{template "addr-list" .Message.Envelope.Cc}}
Bcc: {{template "addr-list" .Message.Envelope.Bcc}}
{{template "message-part-tree" (tuple $ .Message.PartTree)}}
{{define "addr-list"}} {{range $i, $addr := .}} {{if $i}},{{end}} {{.PersonalName}} <{{.Address}}> {{end}} {{end}} {{if .View}} {{.View}} {{else}}

Can't preview this message part.

Download {{end}}
{{template "foot.html"}}