{{range .Messages}}
{{ $classes := "message-list-item" }}
{{ if not (.HasFlag "\\Seen") }}
{{ $classes = printf "%s %s" $classes "message-list-unread" }}
{{ end }}
{{ if (.HasFlag "\\Deleted") }}
{{ $classes = printf "%s %s" $classes "message-list-deleted" }}
{{ end }}
{{ if not (.HasFlag "\\Deleted") }}
{{ range .Envelope.From }}
{{ if .PersonalName }}
{{.PersonalName}}
{{ else }}
{{.MailboxName}}@{{.HostName}}
{{ end }}
{{ end }}
{{ .Envelope.Date | formatdate }}
{{ else }}
(this email was deleted by another client)
{{ end }}
{{ end }}
{{if not .Messages}}
Nothing here yet.
{{end}}