{{template "head.html" .}} {{template "nav.html" .}} {{template "util.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 }} {{ template "aside" . }}
{{$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 and .Extra.HasRemoteResources (not .Extra.RemoteResourcesAllowed)}} {{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}}
This message contains remote content, such as external images. Load remote content »
{{template "message-part-tree" (tuple $ .Message.PartTree)}}
{{define "addr-list"}} {{range $i, $addr := .}} {{if $i}},{{end}} {{.PersonalName}} <{{.Address}}> {{end}} {{end}} {{ $html := .Message.HTMLPart }} {{ $text := .Message.TextPart }}
{{ if and $html (ne $html.PathString $text.PathString) }} Plain text HTML {{ end }}
{{if .View}} {{.View}} {{else}}

Can't preview this message part.

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