The issue: Admin dashboard showed pending emails that the processor wouldn't
process because they had exceeded retry limits (retry_count >= 3).
Changes:
- Updated backend /admin/system/status to provide detailed email queue stats:
- pending: total pending emails (as before)
- processable: emails that will actually be processed (retry_count < 3)
- stuck: emails that exceeded retry limit but are still pending
- Updated frontend to display stuck emails with warning when present
- Created debug-email-queue.js script to diagnose discrepancies
- Created fix-stuck-emails.js script to handle stuck emails:
- Can reset retry count, mark as failed, or delete
- Usage: node fix-stuck-emails.js [reset|fail|delete]
This makes it clear when emails are stuck and won't be processed automatically.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>