{{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 and (not (.HasFlag "\\Deleted")) .Envelope }}
{{ range .Envelope.From }}
{{ if .PersonalName }}
{{.PersonalName}}
{{ else }}
{{.MailboxName}}@{{.HostName}}
{{ end }}
{{ end }}
{{if .Attachments}}📎{{end}}
{{if .HasFlag "\\Answered"}}↩{{end}}
{{if .HasFlag "$Forwarded"}}↪{{end}}
{{ .Envelope.Date | humantime }}
{{ else }}
(this email was deleted by another client)
{{ end }}
{{ end }}
{{if not .Messages}}
Nothing here yet.
{{end}}