Emails 0.1.7: A live email list and one SQS poller you can switch at runtime
Emails 0.1.7 updates the Emails list live when a message’s delivery status changes, and turns SQS polling into a single Oban poller that the settings toggle starts and stops without an app restart.
What changed
- When a logged email moves from sent to delivered or bounced, the row on screen refreshes by itself. Only rows currently shown are reloaded.
- The old background SQS worker is gone; the Oban polling job is now the only poller. Switching SQS polling on or off in the settings used to save the flag and wait for the next boot. It now starts or stops polling right away.
- The polling job could stall and stop scheduling its next run. SQS messages that failed to delete were counted as processed and came back again and again; delete failures are now reported.
- A message is recorded as sent through AWS SES when an SES configuration set is configured, even when the app sends through its own Swoosh mailer.
Dependencies were refreshed, including Oban 2.23.
Full release notes: Emails 0.1.7
0.1.7 · 23 June 2026
Added
- Live-update the Emails admin list on delivery-status changes via PubSub.
Log.update_log/2broadcasts a lightweight{:email_log_updated, …}event only when a log’s status actually changes; the emails LiveView refreshes just the affected on-screen row (no 30-day stats recompute). Best-effort — a PubSub failure can never break the DB write. (#11)
Fixed
- Consolidate SQS polling onto a single Oban-based poller: remove the legacy 842-line
SQSWorkerGenServer.SQSPollingJob+SQSPollingManagerare now the sole poller and runtime control surface (enable/disable without an app restart). (#11) - Self-scheduling no longer stalls: the polling job’s
uniqueconstraint excludes running jobs, so an executing job can enqueue its successor and a crash-orphaned job can’t permanently block new inserts. (#11) - SQS messages no longer re-cycle forever:
delete_message/3returns failures instead of swallowing them as:ok, reads both string and atom receipt-handle keys, and won’t count an undeleted message as processed. (#11) - The admin SQS-polling toggle now starts/stops the poller at runtime (routed through
SQSPollingManager) instead of only persisting the flag and waiting for the next boot. (#11) - Provider detection classifies a message as
aws_seswhen an SES configuration set is configured, even when the host app sends through its own Swoosh mailer. (#11) - Post-merge review fixes: compile clean under
--warnings-as-errorswith Oban 2.23 (narrow the polling job’suniquestates to[:scheduled]), satisfycredo --strictfor the new broadcast helper, and drop a stale retiredearmarkentry from the lockfile.
Changed
- Refresh dependency lockfile (notable bumps:
oban→ 2.23,phoenix_kit→ 1.7.164,phoenix_live_view→ 1.2,swoosh→ 1.26,tesla→ 1.20,bandit→ 1.12,req).
Emails 0.1.7. Install or update: {:phoenix_kit_emails, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.