
The Email That Said 'Sent' But Never Left
The Email That Said 'Sent' But Never Left
13 Nov 2026 · @MarkA
It said "sent." It was lying.
Friday morning. I open my CRM to check on an email campaign and the dashboard looks perfect: Engine Active, toggle glowing green, "2 sent today" ticking up. One problem — nothing's in my inbox. Nothing's in my Resend account either. The app is cheerfully reporting success for emails that never left the building.
That gap — between what the software says happened and what actually happened — cost me the better part of a morning. Here's the whole chase, because the bug sitting underneath it is one almost everyone building on a third-party API will hit eventually.
"Sent" is a claim, not a fact
Here's what I should have questioned in the first five minutes: my CRM was writing status: SENT to the database the moment it called the email provider — not when the provider accepted the message. Those are two very different events, and I'd quietly collapsed them into one.
The counter went up. The row said SENT. The campaign flipped to Complete. Every signal in my own UI said "done." But the provider's dashboard — the only source of truth that actually matters — was empty. The app wasn't lying on purpose. It just never checked whether its own send had succeeded. It assumed.
Four rabbit holes before the real one
When a system fails silently, it hands you no error to follow — so you start guessing. I burned time on every plausible suspect first:
An env kill-switch. We'd added a
CRON_EMAIL_ENABLEDflag months earlier to cut database costs, and it sat upstream of the send. Logical first suspect. It was set correctly.The cron job. No logs, nothing visibly firing — surely the scheduled job wasn't running? It was, every five minutes, quietly doing its thing.
The hosting plan. Maybe the plan throttled scheduled jobs to once a day? Nope — already on the tier that allows per-minute crons.
The sending domain. I'd fat-fingered the from-address subdomain at one point. A real bug, worth fixing — but not the bug.
Every one of these was a reasonable guess. Every one was wrong. That's the tax a silent failure charges: with no error message to anchor you, you debug by elimination, and elimination is slow.
The real bug: an API that doesn't throw
The culprit was a few lines of code — or rather, what wasn't there.
The email SDK I use (Resend v4) doesn't throw an exception when the API rejects your request. It resolves successfully and hands you back an object with an error field tucked inside it. My code awaited the call, took "didn't throw" to mean "worked," and marched straight on to status: SENT:
// the bug: the result is thrown away
await resend.emails.send({ from, to, subject, html })
// ...code continues and marks the row SENT, even on failureA rejected send doesn't throw. It comes back quietly in error — which I never read. So every failure was filed as a success.
The fix is almost insultingly small:
// check what the API actually told you
const { error } = await resend.emails.send({ from, to, subject, html })
if (error) {
throw new Error(`Resend: ${error.name} — ${error.message}`)
}Now a failed send throws, the catch block marks the row FAILED, and — the part that mattered — it writes the real reason into the database instead of swallowing it.
What the error actually said
I shipped that one change, re-ran the queue, and queried the failed rows. There it was, in plain text:
Resend: validation_error — API key is invalidAn invalid API key. That was the whole thing. The entire morning's problem, finally naming itself out loud.
And here's the part that stings: an hour earlier I'd asked, "should I just try a new API key?" — and talked myself out of it because I had no evidence. I was right. I just couldn't prove it yet, because my own code was busy hiding the one piece of evidence that pointed straight at the answer. A fresh key from the correct account, a redeploy, and the test email landed in Resend within seconds.
Three things I'm taking from this
Make failures loud. The most expensive bugs aren't the ones that crash — they're the ones that smile and tell you everything's fine. If a third-party call can fail, your code has to check that it didn't and record the reason when it does. Silence is not success.
Never trust a status you wrote yourself.
SENTin my database meant "we tried," not "it worked." Reconcile against the real source of truth — the provider's own record — before you believe your own dashboard.A hunch you can't prove is still worth chasing — after you make the system honest. My gut said "API key" early. The lesson isn't "always trust your gut"; it's that if I'd made the code tell the truth first, the hunch and the hard evidence would have met an hour sooner.
If you're wiring up Resend, SendGrid, Stripe, Twilio — anything that returns { data, error } instead of throwing — go read your send code right now. Are you checking error? Or are you, like me last Friday, quietly telling your users something shipped when it didn't?
Ready to Build Something?
Book a free 30-minute strategy session — we'll map out exactly what your business needs online.
