Mail Backends
Rule
Two mail backends, chosen automatically per user. When the user has a
connected Google account (isConnected(ownerEmail)), actions call the real
Gmail API. When no account is connected, the same actions fall back
transparently to synthetic local-emails data stored via getUserSetting /
putUserSetting. Never assume Gmail is connected — actions like
search-emails, list-emails, get-thread, get-email, and move-email
branch on this internally, so call them the same way either way.
Why it matters
The fallback exists so the app is usable and demoable without OAuth. It is not a queue that later flushes to Gmail. If you are in fallback mode, do not tell the user that mail left their real inbox or that a real Gmail record changed — say the data is local demo state.
Related Skills
inbox-reads-and-triage— reading mail and reporting coverage honestly.email-drafts— whatsend-emaildoes in each mode, including the synthetic "Sent" item written tolocal-emails.