{% extends "ui/templates/base/layout.html" %} {% block content %}

Incoming Emails

Fetch unread replies from the configured IMAP mailbox and map tracking codes to engagements, tasks or invoices.

{% if flash %}
{{ flash }}
{% endif %}

Fetch from IMAP

Map Existing Emails

Scans unmapped emails for tracking codes such as [AF-ENG-123], [AF-TASK-123] and [AF-INV-INV-001].

Fetched Emails

{% for row in incoming_rows %} {% else %} {% endfor %}
Received From Subject Sender Match Work Mapping Attachments Action
{{ row.received_at_utc or row.fetched_at_utc }}
{{ row.sender_name or '-' }}
{{ row.sender_email or '-' }}
{{ row.subject or '(No subject)' }} {% if row.matched_client_id %}Client{% endif %} {% if row.matched_consultant_id %}Consultant{% endif %} {% if row.matched_user_id and not row.matched_client_id and not row.matched_consultant_id %}User{% endif %} {% if not row.matched_client_id and not row.matched_consultant_id and not row.matched_user_id %}Unmatched{% endif %} {% if row.mapping_status in ['AUTO_MAPPED','MANUAL_MAPPED'] %}
{{ row.mapping_status }}
{{ row.related_module or '-' }} #{{ row.related_id or '-' }}
{% elif row.mapping_status == 'ERROR' %} Error {% else %} {{ row.mapping_status or 'UNMAPPED' }} {% endif %}
{{ row.attachment_count }} Open
No incoming emails fetched yet.
{% endblock %}