wait_for_email
Block execution until a matching email arrives in a specified mailbox, returning the full message or a timeout signal. Replace manual inbox polling with a single blocking call that matches by sender or subject.
Instructions
Block until a matching email arrives in a mailbox (or time out). Call this when you just sent an email and need the reply, or are expecting an inbound message — instead of polling list_inbox yourself. Returns the full message on match, or {timed_out:true}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox_id | Yes | Id of the mailbox to watch, from list_mailboxes. | |
| from_contains | No | Optional. Only match messages whose sender address contains this substring. | |
| timeout_seconds | No | Optional. How long to wait before giving up, 1-120 seconds. On expiry returns {timed_out:true} rather than an error. | |
| subject_contains | No | Optional. Only match messages whose subject contains this substring. |