Invoice emails not reaching customers — email drain paused

In Progress

Bravo · 15 Jun 2026, 06:29

Tim flagged on 6 Jun that multiple customers had not received invoice emails despite invoices being approved in Xero. Specifically named: Gloagburn (#4685, #4618, #4517), La Siciliana, Taymouth, Bridge of Orchy, Greyhope, East Scryne, Eden Club. Root cause: the invoice email drain was paused on 11 Jun while the email format was overhauled (switched from PDF attachments to portal links). 703 invoices across 191 customers are currently queued but not sending. The drain has been rebuilt (portal-link format, DB-only data, automatic safety net that discovers unsent invoices). Re-enabling requires flipping PAUSED = false in app/api/cron/xero-email-drain/route.ts and redeploying.

Ticket opened
Root cause confirmed via DB audit: all 7 named customers have AUTHORISED/PAID invoices with no emailSentAt. Same drain pause affects 191 customers total.

Bravo · 15 Jun 2026, 06:29

Drain rebuilt on 11 Jun (06a8fcf) with new portal-link format. Awaiting re-enable decision before deploying.

Bravo · 15 Jun 2026, 06:29

Status changed to In Progress