Delivery status
client.get(id)
Section titled “client.get(id)”Retrieve a sent email by ID. 404s for ids owned by other teams — no cross-team reads. Never throws — returns { data, error }.
const { data, error } = await client.get(emailId); // id returned by send()data?.status; // EmailStatus — accepted ≠ delivered; poll for bounced / complainedGetEmailResult
Section titled “GetEmailResult”| Field | Type |
|---|---|
id | string |
from | string |
to | string[] |
subject | string |
html | string | null |
text | string | null |
cc | string[] | null |
bcc | string[] | null |
replyTo | string[] | null |
headers | Record<string, string> | null |
status | EmailStatus |
scheduledAt | string | null |
createdAt | string |
updatedAt | string |
createdAt and updatedAt are ISO 8601 strings.
EmailStatus lifecycle
Section titled “EmailStatus lifecycle”queued | sending | sent | delivered | delivery_delayed | bounced | complained | failed | scheduled | canceledStatus updates arrive asynchronously from SES — a send() success means accepted, not delivered. Poll get() (or query later) to handle bounced / complained.