Ana içeriğe geç

Email

Outbound email — the tenant's own SMTP server (branded delivery).

📄️Read an email channel's history-sync intent and progress

The mailbox HISTORY SYNC is the opt-in backfill of mail older than the live poller's 7-day window. This returns the channel's intent (`config.piping.history_sync`) merged with the runtime state the import job writes (`config.history_sync`) — one record, so the panel polls one endpoint while a run is in flight. A channel that has never synced reads as `status: idle` with zeroed counters, never null. A personal mailbox is readable only by its owner.

📄️Start or resume an email channel's history sync

START the one-shot import (optionally moving `since` and any effect switch): the state is parked as `queued` and the job dispatched. `resume: true` continues a `paused` or `failed` run from its cursor, keeping its counters and its `total`. `resume: false` or absent starts a FRESH run — counters, cursor and `total` reset; the run first counts the window exactly (`phase: counting`), then imports (`phase: importing`). Mail already stored is never fetched again: it is probed, skipped and counted in `skipped`. A `paused` run may be resumed or fresh-started (discarding the pause). A run already `queued`/`running` is a 409. Authorisation: see `MailHistorySync.can_manage`. Gmail transport only — any other transport is refused with 422.

📄️The 'Şu saatte gönder' quick choices

Computed in the WORKSPACE timezone so 'tomorrow morning' is the workspace's morning: `later_today` (three hours on, on the hour — offered only while that is still today and no later than 20:00), `tomorrow_morning` (08:00) and `monday_morning` (08:00, unless tomorrow already is Monday). Instants are UTC; each preset also comes as the workspace's wall clock (`local`), with `today` and `now` on that clock, so a client builds a custom time (sent back as a bare wall-clock `send_at`) without timezone arithmetic of its own.