Sending

Delivery states

Distinguish API acceptance, provider submission, recipient delivery, and ambiguous submissions in Ternwire.

On this page

The dashboard shows where each email is with one status, such as Handed off or Delivered. This page explains what each status means and which API value it stands for. None of them can tell you whether an email landed in the inbox or the spam folder.

Behind each status, Ternwire tracks two things: the message as a whole, and each recipient's outcome. A 202 response means the API accepted the message. A submitted message has reached our sending provider, and a delivered recipient has a delivery confirmation from their mail server.

Message submission states

API stateIn the dashboardMeaning
accepted, queuedSendingRecorded and waiting to be sent.
submittingSendingWe are handing it to our sending provider.
submittedHanded offWe handed the email to our sending provider and are waiting for the receiving servers' answer. Once they answer, the dashboard shows the recipients' outcome instead.
heldNeeds attentionPaused by a sending limit. Inspect holdReason and heldAt when present. holdReason is a value such as sending_paused, sending_suspended, sending_unavailable or broadcast_paused.
submission_unknownNeeds attentionWe couldn't tell whether the provider accepted it. It may have been delivered, so sending it again can cause a duplicate. If our one retry can't run within 12 hours, we stop trying and the email stays submission_unknown.
failedFailedWe couldn't send it.

GET /v1/emails/:id returns the message state, the recipient counts in recipients (queued, delivered and failed), and every recipient in recipientDetails, to first, then cc and bcc. Each entry has the recipient's ID, address, kind, state from the list below, lastEventAt, when its latest delivery event was recorded, and reason, why it didn't get the email when that is known: the reason of its email.rejected event, or the bounce type and subtype from the receiving server, such as Permanent/NoEmail. lastEventAt and reason are null until there is something to report.

Keep the message ID in your application so support and recovery can refer to the same email.

Recipient outcomes

Each recipient starts as queued and then gets its own outcome, so one email to three people can be delivered to two and bounce for the third.

API stateIn the dashboardMeaning
queuedSendingNot handed to the provider yet.
submittedHanded offHanded to the provider, waiting for the recipient's mail server.
delayedDelayedThe recipient's mail server asked us to try again later. We keep trying.
deliveredDeliveredThe recipient's mail server accepted the email.
bouncedBouncedThe recipient's mail server refused the email.
complainedMarked as spamThe recipient got the email and reported it as spam.
rejectedRejectedOur sending provider refused to send it, usually because of a virus or a blocked kind of attachment.
suppressedBlockedThe address is on your Blocked addresses list, so we didn't send to it.

The email's status in the dashboard combines its recipients. When every recipient was delivered, it shows Delivered. When some were delivered and some bounced, were rejected or were blocked, it shows Partly delivered. When none got it, it shows Bounced. A spam complaint from any recipient shows Marked as spam.

An email.rejected event tells you a recipient won't get the email. Its data.reason is there when Ternwire, not the receiving server, ended the attempt:

ReasonMeaning
submission_rejectedThe provider refused the email, or we still couldn't hand it over 12 hours after we accepted it.
hold_expiredThe email stayed held for 72 hours, so we stopped trying. Send it again once the hold is resolved.

A delay is not a final delivery failure. A complaint can arrive after a delivery confirmation. Process updates by message and recipient, and do not assume a successful earlier event rules out a later complaint.

Handle uncertainty without duplicating mail

After an API timeout, retry the identical payload with its original idempotency key. After submission_unknown, inspect the message and its possibleDuplicate flag before you decide on recovery.

A new idempotency key represents a new email. It is not a safe way to poll or to resolve uncertainty.

Use webhooks for changes and the message endpoint when reconciling your local state. Try each outcome in test mode before you connect it to customer-facing actions.