Email: Add Admin Email Monitoring Dashboard

Summary

Implements "Admin Email Monitoring" an admin-only dashboard to monitor transactional email jobs, inspect queue health, filter recent jobs, and manually retry failed deliveries.

Admin Email Monitoring

  • New admin route: /admin/email-jobs
  • Linked from the Admin Dashboard (admin role only)
  • Current queue state widgets: Pending, Sent, Failed, Retrying
  • Filters (auto-submit): Status, Email Type, Date Range, Recipient search
  • Queue health panel: sent/failed today, backlog, oldest pending, recent errors
  • Email jobs table with recipient, type, status, created, retries, last error, and per-row retry action
  • Bulk retry: “Retry failed” for jobs matching current filters
  • Manual retry re-queues failed jobs via EmailQueueService::retryFailedJob()

Backend

  • Admin/EmailJobsControllerindex, retryFailed, retryAllFailed
  • EmailJobsTablefindFiltered(), getSummaryStats(), recipient/type helpers
  • EmailQueueServiceretryFailedJob() for admin-initiated retries
  • Routes for retry actions under /admin/email-jobs

Test plan

  • Log in as admin → Admin Dashboard shows Email Monitoring card
  • Open /admin/email-jobs → page loads with queue stats, filters, queue health, and jobs table
  • Log in as non-admin → /admin/email-jobs returns forbidden
  • Filter by status, email type, date range, and recipient → results update correctly
  • Failed job → Retry in Actions column re-queues the job
  • Retry failed button re-queues all failed jobs matching current filters
  • Queue health metrics reflect current job state

Screenshot from 2026-07-09 23-17-33.png

Screenshot from 2026-07-09 23-16-55.png

Merge request reports

Loading
Loading