send_test_code
Inject a sample 6-digit OTP email into an inbox so you can test OTP wait flows when no real email has arrived.
Instructions
Put one sample OTP email (a random 6-digit code) into inbox_id.
Use this to check the wait loop end to end when you have no real email
to trigger. It does NOT go through the mail server: the message is
stored and parsed exactly like real inbound mail, so ``wait_for_otp``
returns it.
How to pair it with the wait (one call at a time, no concurrency):
BEFORE calling this tool, take a cutoff, either the ``id`` of the newest
message (``get_latest``; use ``since=0`` if the inbox is empty) or the
current time (ISO8601 or unix seconds). Then call ``send_test_code``,
then ``wait_for_otp(inbox_id, since=<that cutoff>)``. Without ``since``,
the wait only matches mail arriving during the wait itself and would
miss this code. Do not pass the returned ``message_id`` as ``since``:
that means "after this message" and skips it.
Limits: 5 per inbox and 20 per account per hour (shared with the
dashboard "Send a test code" button); over that, a clean rate-limit
error says when to retry. A disabled inbox, or an unknown/deleted/
foreign inbox id, returns a clean tool error and nothing is charged.
Side effects: creates one message in the inbox (counts toward monthly
message usage and fires the inbox's webhook, like real mail). Makes one
network call to the mailsocket API (``openWorldHint``). Returns
``message_id`` and ``sent_at`` of the new message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inbox_id | Yes |