loadDbEmailSettings and sendViaEmailPlugin (in auth/config.ts) both queried:
SELECT settings FROM plugins WHERE id = 'email'
The v2 plugins table no longer exists on greenfield v3 installs. The query silently threw (caught) and returned null, so email was never configured from the admin UI — every send fell back to the console provider.
Fix: Both now read from the documents table:
SELECT data FROM documents
WHERE type_id = 'plugin' AND slug = 'email'
AND is_current_draft = 1 AND deleted_at IS NULL
Also handles resendApiKey (current field name) with apiKey as fallback for older installs.
#1099 — ResendProvider / SendGridProvider crash with "Illegal invocation" on Workers
Both providers stored a reference to the global fetch: