Skip to Content

The PickupSource type of the TypeScript SDK, which pickups.create and 3 more methods take or answer.

type PickupSource = {
  completedAt: number | null
  consecutiveFailures: number
  createdAt: number
  deleteAfterFetch: boolean
  dispatch?: PickupDispatch
  enabled: boolean
  host: string
  id: string
  importedTotal?: number
  intervalMinutes: number
  labelName: string | null
  lastError: string | null
  lastImportedCount: number | null
  lastOversizeCount: number | null
  lastRunAt: number | null
  lastStatus: ('ok' | 'partial' | 'auth_failed' | 'error') | null
  mailboxId: string
  markRead: boolean
  mode: ('sync' | 'import')
  name: string | null
  port: number
  quietDays: number
  quietSince?: number | null
  tls: ('tls' | 'starttls')
  username: string
}

Fields

FieldTypeDescription
completedAtnumber | nullWhen an import completed, epoch seconds; null while it runs, and always in sync mode. A completed source is disabled and holds no password: re-enabling it needs the password again
consecutiveFailuresnumberNumber of consecutive failed polling attempts
createdAtnumberCreation timestamp in epoch seconds
deleteAfterFetchbooleanTrue if messages should be deleted from remote server after fetching
dispatchPickupDispatchOptional.
enabledbooleanTrue if automatic polling is enabled
hoststringRemote POP3 server hostname (e.g. 'pop.example.com')
idstringPickup source ULID
importedTotalnumberOptional. Messages this source has stored (replays excluded), counted as they arrive. ABSENT on the operator listing
intervalMinutesnumberPolling interval in minutes
labelNamestring | nullLabel (folder) fetched mail files into; null = INBOX. Created on first use if missing. An explicit destination is not spam-scored; a Sieve fileinto still wins; a blocked sender still files to Junk
lastErrorstring | nullError message from most recent failed run, or null
lastImportedCountnumber | nullMessages the fetcher uploaded on the most recent completed run (its report's uploadedCount). Null until a run has reported; 0 is a run that found nothing waiting
lastOversizeCountnumber | nullMessages the fetcher left on the remote server on its most recent run because they are over the platform's message size limit; they are never imported and do not hold an import open. Null until a run has reported it
lastRunAtnumber | nullTimestamp of most recent pickup attempt in epoch seconds, or null
lastStatus('ok' | 'partial' | 'auth_failed' | 'error') | nullOutcome status of most recent run, or null
mailboxIdstringDestination mailbox ULID where fetched mail is deposited
markReadbooleanTrue if every imported message lands read. False (the default): messages dated before the source was added — the backlog — land read, newer ones unread; POP3 itself carries no read state
mode('sync' | 'import')sync = keep collecting from this account for as long as the source exists. import = move off this account: the source completes itself once a run finds the remote mailbox drained and no new message has been stored for quietDays, then switches off and forgets the remote password
namestring | nullUser-assigned label for this remote account (e.g. 'Old Gmail'), or null
portnumberRemote POP3 server port (e.g. 995 for TLS, 110 for STARTTLS)
quietDaysnumberDays without a newly stored message, after a drained run, that complete an import (1 to 90). Ignored in sync mode
quietSincenumber | nullOptional. When the quiet window last restarted (a message was stored, the source was re-enabled or switched to import), epoch seconds; null = since createdAt. ABSENT on the operator listing
tls('tls' | 'starttls')Transport security mode ('tls' or 'starttls')
usernamestringRemote POP3 account login username

Used by

MethodWhat it does
pickups.createCreate POP3 pickup source
pickups.listList POP3 pickup sources
pickups.getGet a POP3 pickup source
pickups.updateUpdate a POP3 pickup source

On this page