{{define "view_message_content.html"}}
From: {{.log.mail_from}}
To: {{.log.to_address}}
CC: {{if .log.cc_addresses}}{{.log.cc_addresses}}{{else}}None{{end}}
BCC: {{if .log.bcc_addresses}}{{.log.bcc_addresses}}{{else}}None{{end}}
Subject: {{if .log.subject}}{{.log.subject}}{{else}}N/A{{end}}
Date: {{strftime "%Y-%m-%d %H:%M:%S" .log.created_at}}
{{if .log.attachments}}
Attachments:
{{range .log.attachments}}
{{.Filename}} ({{.ContentType}}, {{filesize .Size}})
Download
{{if .IsImage}}{{.Filename}}{{end}}
{{end}}
{{end}} {{if .log.legacy_attachments}}
Saved attachment files (from this sender/IP's "Store Full Message Content" setting)
{{end}}
Message Content:
{{if .log.has_content}} {{if .log.html_body}}
{{.log.html_body}}
{{else if .log.plain_body}}
{{.log.plain_body}}
{{else}}

Message stored, but no readable body could be parsed out of it.

{{end}} {{else}}

Not stored, by design — the message content is only kept in this log when the sender/IP has "Store Full Message Content" enabled, or the message was quarantined as spam. Headers below are always kept.

{{end}}
Message Headers:
{{.log.email_headers}}
{{end}}