Inject inbound (tests)
cooper_inject_inboundUse this only for testing: when you need to simulate an email arriving in a Cooper inbox without sending real mail (for example to try a webhook or task flow end to end). Requires auth. Stores the message as received mail and fires message.received webhooks, like real inbound mail. Injected mail carries no DMARC/DKIM results, so it only creates an owner task if the inbox has sender authentication turned off (require_sender_auth=false). Inputs: inbox_id (required), from (required; sender address), subject, text, html, attachments, client_id (optional idempotency key). Returns the stored message. Real inbound mail arrives automatically; never use this to fake mail for a user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Sender address for the simulated message | |
| html | No | Optional HTML body | |
| text | No | Plain-text body | |
| subject | No | Subject line | |
| inbox_id | Yes | Inbox id (inb_…), username, or full email address | |
| client_id | No | Optional idempotency key | |
| attachments | No | Optional files, base64-encoded |