{% extends 'base.html' %} {% block title %}Mail · Keywright{% endblock %} {% block body %} {% include '_mail_style.html' %}

Mail

{{ cfg.account }} · {{ cfg.mailbox }}{% if cfg.last_sync %} · Last sync {{ cfg.last_sync[:16]|replace('T',' ') }} UTC{% endif %}

{% include '_mail_nav.html' %} {% if not cfg.resource %}
Connect your mailbox to browse messages and run rules. Set up connection
{% endif %} {% if cfg.sync_error %}{% endif %} {% if not cfg.enabled %}

Automatic processing is paused. You can refresh the inbox and run rules on individual messages.

{% endif %}
{% for row in messages %} {{ row.sender }}{{ row.subject or '(No subject)' }} {{ statuses.get(row.status,row.status) }}{% if row.attachments %}{{ row.attachments|length }} attachment{{ 's' if row.attachments|length != 1 }}{% endif %} {% else %}
No messages here{{ 'Try another search or filter.' if q or status else 'Refresh to load your inbox.' }}
{% endfor %}
{{ total }} messages · {{ page }}/{{ pages }}{% if page > 1 %}Previous{% endif %} {% if page < pages %}Next{% endif %}
{% if message %} Back to messages

{{ message.subject or '(No subject)' }}

{{ statuses.get(message.status,message.status) }} {% if not message.present %}No longer in {{ cfg.mailbox }}{% endif %}
From
{{ message.sender }}
To
{{ message.recipients|join(', ') }}
Date
{{ message.date }}
{% if message.plan %}{{ message.plan.name }}{% else %}Processing status{% endif %}

{{ message.note or 'No rule has been run on this message.' }}

{% for filename, receipt in message.receipts.items() %}{% if receipt is mapping %}

Delivered {{ filename }} · Budget document #{{ receipt.id }}

{% endif %}{% endfor %} {% if message.request_id %}

View approval request

{% endif %} {% if message.status != 'done' %}
{% endif %}
{% if message.attachments %}
Attachments{% for name in message.attachments %}
{{ name }}{% if name.lower().endswith('.pdf') %}Download PDF{% endif %}
{% endfor %}
{% endif %}
{{ message.body if message.body is not none else 'Message body is unavailable. Check access permissions and refresh.' }}
{% else %}
Your inbox, with a delivery trailSelect a message to read it, view attachments, and check what its rules have done.
{% endif %}
{% endblock %}