{{template "head.html" .}} {{template "nav.html" .}} {{template "util.html" .}}
{{ $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 »
{{ $attachments := .Message.Attachments }} {{ if $attachments }}

Attachments

{{ end }}
{{define "addr-list"}} {{range $i, $addr := .}} {{if $i}},{{end}} {{.PersonalName}} <{{.Address}}> {{end}} {{end}} {{ $html := .Message.HTMLPart }} {{ $text := .Message.TextPart }}
{{/* https://github.com/golang/go/issues/31103 */}} Plain text {{ if and $html $text }} {{ if ne $html.PathString $text.PathString }} HTML {{ end }} {{ end }} Raw email
{{if .View}} {{.View}} {{else}}

Can't preview this message part.

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