Cancel outgoing email
cancel_outgoing_emailCancel a queued outgoing email before it sends. Prevents delivery of a message that is still waiting, but cannot recall one already transmitted.
Instructions
Stops a message you queued from being sent, while it is still waiting. It CANNOT recall a message that has already been transmitted: once the delivery pass has begun offering the message to a mail server the call is refused and nothing is withdrawn, and that window is ordinarily seconds long. A message that was already cancelled is answered with its state and nothing happens twice, so repeating the call is safe. The message is destroyed rather than paused — nothing here reschedules a send, and no further call brings a cancelled message back; queue it again with a sending tool and a new idempotencyKey if you still want it sent. It reaches no mail server and nobody outside this deployment. You can only cancel a message you queued yourself, and a message queued by anybody else reads as not found. Check the state it answers with, or call get_outgoing_email, rather than assuming the message is gone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outgoingEmailId | Yes | The identifier of the queued message, exactly as the sending tool returned it in outgoingEmailId. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | How far this message has got. | |
| queuedAt | Yes | When the send was first written down, as an ISO 8601 timestamp. | |
| accountId | Yes | The configured MailFathom account identifier the message is sent as. | |
| recipients | Yes | One entry per person the message is addressed to, in the order the headers name them. These are the addresses the send named and no others. | |
| failureCode | No | The five-digit MailFathom error code of the failure the last delivery attempt ended in, or absent while no attempt has failed. It is the same code a failed call reports, and it can be present on a message that later succeeds. | |
| attemptCount | Yes | How many delivery attempts have been made for this message. It is counted before each attempt rather than after it, so a message being attempted right now already shows that attempt. | |
| outgoingEmailId | Yes | The stable identifier of the message, the same value the sending tool answered with. |