Traffic
`traffic.list`, `listAll` and `iterate`.
Every method
const bounced = await nextmail.traffic.listAll({ direction: 'outbound', outcomes: ['bounced', 'deferred'], since: new Date(Date.now() - 86_400_000),}) for (const entry of bounced) console.log(entry.recipient, entry.status, entry.detail) for await (const entry of nextmail.traffic.iterate({ direction: 'inbound', outcomes: ['refused'] })) { console.log(entry.recipient, entry.reason)}One entry for each message and recipient at each step it took in or out of the workspace, newest first, kept for 30 days. Inbound entries say where mail that arrived went, and why it was refused or dropped. Outbound entries carry the answer of the receiving server: the status code, its reply, the servers on each side and how long delivery took. Reading outbound entries needs emails:read and inbound ones threads:read.
An entry never changes once it is written and keeps its id, so reading a page again is safe. The sender and the reply are stored encrypted and cannot be searched: filter by address, recipient, outcomes, direction, domainId and the time.
Google Workspace