email_delivery_apply
# email_delivery_apply
Send or schedule one ready draft, or cancel a schedule before it is pending, in the Email app (pApp F00003). Requires confirmation SEND_EMAIL, SCHEDULE_EMAIL or CANCEL_EMAIL_SCHEDULE. Sends to recipients and cannot be recalled; needs host delivery authorization. The preview never sends. When sending cannot run here, the answer is MESSAGING_DELIVERY_CONSOLE with the console send screen (consoleUrl), and nothing is sent. A lost receipt stays pending and is never resent; task_resume only observes, and prepared work needs the identical apply. Called without confirmToken it previews and returns a confirmToken; repeating the same input with it executes once. Ask the user again before executing; this cannot be undone. When the preview has requiresReconfirmation, execute only with irreversibleConfirmed: true after the person confirms again.
## Inputs
| Field | Required here | Contract |
| --- | --- | --- |
| `target` | Yes | object |
| `target.emailId` | Yes | string; pattern `^[A-Za-z0-9_-]{1,200}$`; Exact email identifier returned by email_drafts_get. |
| `change` | Yes | one of: `send`, `schedule`, `cancel` (by `action`) |
| `change.confirmation` | Yes | When `change.action` is `send`: `SEND_EMAIL` |
| `change.sendAt` | Yes | When `change.action` is `schedule`: string; pattern `^(?:(?:\d\d[2468][048]\|\d\d[13579][26]\|\d\d0[48]\|[02468][048]00\|[13579][26]00)-02-29\|\d{4}-(?:(?:0[13578]\|1[02])-(?:0[1-9]\|[12]\d\|3[01])\|(?:0[469]\|11)-(?:0[1-9]\|[12]\d\|30)\|(?:02)-(?:0[1-9]\|1\d\|2[0-8])))T(?:(?:[01]\d\|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z\|([+-](?:[01]\d\|2[0-3]):[0-5]\d)))$`; format `date-time` |
| `change.confirmation` | Yes | When `change.action` is `schedule`: `SCHEDULE_EMAIL` |
| `change.confirmation` | Yes | When `change.action` is `cancel`: `CANCEL_EMAIL_SCHEDULE` |
| `confirmToken` | No | string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |
| `irreversibleConfirmed` | No | `true`; true only after the person confirmed again, when the preview has requiresReconfirmation: the action cannot be undone. |