{% extends "base.html" %} {% from "components/ui.html" import csrf_field with context %} {% set verb = stored.reference.action if stored is not none and stored.reference is not none else values.get("action", "") %} {% set action_name = {"reply": "Reply", "reply_all": "Reply to all", "forward": "Forward"}.get(verb, "") %} {% set title = ("Draft" if draft_id else (action_name or "New message")) %} {% block title %}{{ title }} · {{ account.email }} · {{ APP_NAME }}{% endblock %} {% block heading %}{{ title }}{% endblock %} {% block subheading %}
From {{ account.email }}{% if draft_id %} · all drafts{% endif %}
{% endblock %} {% block content %} {% if error %}{% endif %} {% if original is not none %}

{{ action_name }}: {{ original.subject | or_missing }}

{{ original.sender | address }}, {{ original.date | when }}
{% if draft_id %}

The draft holds its {{ "forward" if verb == "forward" else "quote" }} already. Saved or sent, it stays linked to this message{% if verb != "forward" %} and in its thread{% endif %}.

{% else %}

{% if values.action == "forward" %}The original goes along below your text, with its attachments.{% else %}Your text comes first. The original is quoted below it.{% endif %} Empty fields are filled in from the original: {% if values.action == "forward" %}the subject.{% else %}recipients and subject.{% endif %}

{% endif %}
{% endif %} {% if not can_send and not can_save %}
You may neither send nor save drafts from this account.
{% endif %}
{{ csrf_field() }} {% if values.get("original") %} {% endif %}
Receive it, but appear in no header.
HTML version
{% if values.get("action") == "forward" %}
{% endif %} {% if stored is not none and stored.attachments %}
Attached
{% for a in stored.attachments %} {{ a.filename | or_missing }} ({{ a.size | size }}) {% endfor %}
{% endif %}
Up to 25 MB together.{% if error %} Files chosen before must be chosen again.{% endif %}
{% if can_send %}{% endif %} {% if can_save %}{% endif %} {% if can_delete %}{% endif %}
{% endblock %}