{% extends "base.html" %} {% from "components/ui.html" import action, csrf_field, folder_options with context %} {% block title %}{{ message.subject | or_missing }} · {{ APP_NAME }}{% endblock %} {% block heading %}{{ message.subject | or_missing }}{% endblock %} {% block subheading %}
{{ account.email }}{% for folder_id in message.folder_ids %} · {{ folder_names.get(folder_id, folder_id) }}{% endfor %}
{% endblock %} {% block actions %} {% if can.write %} {% for verb, label in [("reply", "Reply"), ("reply_all", "Reply to all"), ("forward", "Forward")] %} {{ label }} {% endfor %} {% endif %} {% if can_raw %}Download original{% endif %} {% endblock %} {% block content %}
From
{{ message.sender | address }}
To
{{ message.to | addresses }}
{% if message.cc %}
Cc
{{ message.cc | addresses }}
{% endif %} {% if message.bcc %}
Bcc
{{ message.bcc | addresses }}
{% endif %} {% if message.reply_to %}
Reply to
{{ message.reply_to | addresses }}
{% endif %}
Date
{{ message.date | when }}
Flags
{{ "unread" if message.unread else "read" }}{% if message.starred %}, starred{% endif %} {% for keyword in message.keywords %}{{ keyword }} {% endfor %}
Id
{{ message.id }}
{% set url = "/ui/accounts/" ~ account.id ~ "/mail/" ~ message.id %} {% if can.change or can.trash or can.purge %}
{% if can.change %} {{ action(url ~ "/flags", "Mark unread" if not message.unread else "Mark read", fields={"unread": "0" if message.unread else "1"}, cls="") }} {{ action(url ~ "/flags", "Unstar" if message.starred else "Star", fields={"starred": "0" if message.starred else "1"}, cls="") }} {% if tree %}
{{ csrf_field() }}
{% endif %} {% endif %} {% if can.trash and not in_trash %}{{ action(url ~ "/delete", "Move to the trash", fields={"back": "/ui/accounts/" ~ account.id ~ "/mail"}, cls="") }}{% endif %} {% if can.purge %}{{ action(url ~ "/delete", "Delete for good", confirm="Delete this message for good? This cannot be undone.", cls="danger", fields={"permanent": "1", "back": "/ui/accounts/" ~ account.id ~ "/mail"}) }}{% endif %}
{% endif %} {% if message.attachments %}

Attachments

{{ message.attachments | length }}
{% for a in message.attachments %} {% endfor %}
{{ a.filename | or_missing }}{{ a.content_type }}{% if a.inline %}, inline{% endif %} {{ a.size | size }} {% if can_attachment %}Download{% endif %}
{% endif %}

Message

{% if from_html %}Written as HTML, shown here as text.{% elif message.html_body %}Also has an HTML part, not shown.{% endif %}
{% if body %}
{{ body }}
{% else %}
No text.
{% endif %}
{% endblock %}