{{define "webmail_message.html"}} {{.parsed.Header.Subject}} - Webmail {{template "csrf_script" .}}
{{range .flashes}} {{end}}
Back to {{.active_folder}}
{{if .parsed.Header.Subject}}{{.parsed.Header.Subject}}{{else}}(no subject){{end}}
{{if or .smime.Signed .smime.Encrypted}}
{{if .smime.Encrypted}} {{if .smime.Decrypted}}Encrypted & decrypted {{else}}Encrypted — could not decrypt{{end}} {{end}} {{if .smime.Signed}} {{if .smime.SignatureOK}}Signature verified{{if .smime.SignerEmail}} ({{.smime.SignerEmail}}){{end}} {{else}}Signature invalid{{end}} {{end}}
{{end}} {{if .pgp.Encrypted}}
{{if .pgp.Decrypted}}PGP encrypted & decrypted {{else if .pgp.NeedsUnlock}}PGP encrypted — enter your passphrase to decrypt {{else}}PGP encrypted — could not decrypt{{end}}
{{if .pgp.NeedsUnlock}}
{{end}} {{end}}
From: {{.parsed.Header.From}}
To: {{.parsed.Header.To}}
{{if .parsed.Header.Cc}}
Cc: {{.parsed.Header.Cc}}
{{end}}
Date: {{.parsed.Header.Date}}
{{if .html_body}}
{{.html_body}}
{{else if .parsed.TextBody}}
{{.parsed.TextBody}}
{{else}}

(empty message body)

{{end}} {{if .parsed.Attachments}}
Attachments
{{$folder := .active_folder}} {{$uid := .uid}} {{range $i, $att := .parsed.Attachments}} {{$att.Filename}} {{end}}
{{end}}
{{template "compose_widget" .}} {{template "webmail_shortcuts" .}} {{end}}