whisper-money/app/Mail
Víctor Falcón ce6bfc9c56
feat(drip): email users stuck on the paywall a day after onboarding (#562)
## What

Sends an automated follow-up email the day after a user finishes
onboarding but stays stuck on the paywall, asking why they didn't
continue and inviting a direct reply.

## Why

Users who connect a bank account during onboarding but never pick a plan
are permanently redirected to the paywall by `EnsureUserIsSubscribed` —
they finish onboarding and then can't access the app. This reaches out
to understand the friction and recover them.

## Who gets the email (the genuinely stuck cohort)

- `onboarded_at` is calendar-yesterday (`whereDate('onboarded_at',
today()->subDay())`)
- Has an active banking connection (`bankingConnections()->exists()`)
- No Pro plan (`hasProPlan()` is false)
- Hasn't already received this email (idempotent via `UserMailLog`)

Users **without** a bank connection are excluded: they fall through to
free access after seeing the paywall once, so they aren't stuck.

## How

- New `email:paywall-follow-up` command scans the cohort daily and
queues the job — scheduled `dailyAt('10:00')` Europe/Madrid in
`routes/console.php`.
- New `DripEmailType::PaywallFollowUp` (`paywall_follow_up`) +
idempotent send job following the existing drip pattern.
- Short, human Markdown email with an explicit `replyTo`
(`hi@whisper.money`) so replies reach a real inbox.
- Spanish copy added to `lang/es.json`.

## Tests

10 new tests (correct cohort matched; wrong day / no bank / Pro plan
excluded; no double-send; no-op when drip disabled). `pint` clean.

## Note

There was no existing user-scanning drip command (current drips dispatch
with `delay()` on `Registered`). Since "stuck on paywall" state isn't
known at registration time, a daily scanning command is the right fit.
2026-06-19 14:11:12 +00:00
..
Drip feat(drip): email users stuck on the paywall a day after onboarding (#562) 2026-06-19 14:11:12 +00:00
BankTransactionsSyncedEmail.php fix: make transaction sync email use default sender (#265) 2026-04-07 13:50:42 +01:00
BankingConnectionAuthFailedEmail.php fix: split drip and default email senders (#263) 2026-04-06 12:16:47 +02:00
BankingConnectionExpiredEmail.php Notify users about expired bank connections (#404) 2026-05-20 09:20:13 +02:00
BrokenBankLogosReportEmail.php fix: split drip and default email senders (#263) 2026-04-06 12:16:47 +02:00
EnableBankingConnectionsCancelledEmail.php Cancel Enable Banking connections for free users (#289) 2026-04-15 16:23:03 +02:00
UpdateEmail.php fix: split drip and default email senders (#263) 2026-04-06 12:16:47 +02:00
UserLeadInvitation.php feat(leads): cohort-based launch invitations with per-user Stripe coupons (#333) 2026-04-30 15:10:28 +01:00
UserLeadReInvitation.php feat(leads): add user lead re-invite campaign (#432) 2026-05-26 08:35:31 +02:00
WaitlistOvertaken.php feat: selective retry of failed lead email jobs (#286) 2026-04-15 08:00:29 +01:00
WaitlistReferralNotification.php feat: selective retry of failed lead email jobs (#286) 2026-04-15 08:00:29 +01:00
WaitlistWelcome.php feat: selective retry of failed lead email jobs (#286) 2026-04-15 08:00:29 +01:00