{% extends "layout.html" %} {% block title %}Tasks - MailCadence Admin{% endblock %} {% block content %}

Mail Tasks

Configure automated task definitions, recipient lists, and Jinja2 templates.

{% if message %}
{{ message }}
{% endif %} {% if error %}
{{ error }}
{% endif %}
Create / Update Task
{% if tasks %}
{% endif %}
{% if available_templates %} {% endif %}
{% for tpl in available_templates %} {% endfor %}
Raw JSON Sync Field

Configured Tasks

{% if tasks %}
{% endif %}
{% if tasks %}
{% for task in tasks %} {% set status_info = task_statuses.get(task.id, {}) if task_statuses else {} %} {% endfor %}
ID Window / State Schedule Sender Subject Template Recipients Actions
{{ task.id }} {% if task.priority == 'high' %} high {% elif task.priority == 'low' %} low {% else %} normal {% endif %}
{% if status_info.get('status_key') == 'dispatched_in_window' %} Sent in Window {% elif status_info.get('status_key') == 'eligible_now' %} Window Open • Ready {% else %} Outside Window {% endif %}
Last: {% set last_st = status_info.get('last_status', 'NEVER_RUN') %} {% if last_st == 'SUCCESS' %} {{ last_st }} {% elif last_st == 'FAILED' %} {{ last_st }} {% elif last_st == 'PARTIAL' %} {{ last_st }} {% else %} NEVER_RUN {% endif %}
{{ task.schedule_ref }} {{ task.sender }} {{ task.subject }} {{ task.body_template.template_path }} ({{ task.body_template.format }})
To: {{ task.recipients.to | join(', ') }}
{% if task.recipients.cc %}
Cc: {{ task.recipients.cc | join(', ') }}
{% endif %} {% if task.recipients.bcc %}
Bcc: {{ task.recipients.bcc | join(', ') }}
{% endif %}
Preview
{% else %}

No mail tasks found.

Create a new task above to start dispatching emails.

{% endif %}
{% endblock %}