{% extends 'admin/layout.html.twig' %} {% block page_title %}Email Logs{% endblock %} {% block content %}

Email Statistics

Monitor all outgoing emails from the system

{# Today's Quota Usage #}

Today's Quota Usage

{{ todayStats.date ? todayStats.date|date('l, F j, Y') : 'Today' }}

{{ todayStats.totalCount }} / {{ quotaLimit }}
{{ quotaUsagePercent }}% used
{# Progress bar #}
{{ remaining }} emails remaining
{% if urgencyLevel == 'critical' %}

Quota Exceeded: You've reached your daily email limit. Additional emails may not be delivered.

{% elseif urgencyLevel == 'high' %}

Warning: You're approaching your daily quota limit. Monitor email activity closely.

{% endif %}
{# Summary Cards #}
{# Today #}

Today

{{ todayStats.totalCount }}
emails sent
{% if todayStats.breakdown|length > 0 %}
{% for type, count in todayStats.breakdown %}
{{ type|replace({'_': ' '})|title }} {{ count }}
{% endfor %}
{% endif %}
{# This Week #}

Last 7 Days

{{ weekTotal }}
emails sent
Avg: {{ (weekTotal / 7)|round(1) }} per day
{# This Month #}

Last 30 Days

{{ monthTotal }}
emails sent
Avg: {{ (monthTotal / 30)|round(1) }} per day
{# Daily Breakdown Chart #} {% if weekStats|length > 0 %}

Last 7 Days Trend

{% for stats in weekStats %} {% set percent = (stats.totalCount / quotaLimit * 100)|round(1) %}
{{ stats.date|date('D, M j') }} {{ stats.totalCount }} / {{ quotaLimit }} ({{ percent }}%)
{% endfor %}
{% endif %} {# Detailed Logs #}

Email Logs

Showing {{ selectedDateLogs|length }} emails sent on {{ selectedDate|date('F j, Y') }}

{% if selectedDateLogs|length > 0 %}
{% for log in selectedDateLogs %} {% endfor %}
Time Recipient Subject Type Status
{{ log.sentAt|date('g:i A') }} {% if log.recipientUser %}
{{ log.recipientUser.fullName }}
{{ log.recipientEmail }}
{% else %} {{ log.recipientEmail }} {% endif %}
{{ log.subject }} {{ log.emailType|replace({'_': ' '})|title }} {% if log.status == 'sent' %} Sent {% else %} Failed {% endif %}
{% else %}

No emails sent

No emails were sent on this date.

{% endif %}
{% endblock %}