Mailly文档

Wait for new inbound email

GET
/inbox/messages/wait

Long-polls up to timeout seconds (default and max 25; 0 checks once) for inbound email matching the optional filters, then returns it with a cursor. Pass the cursor to the next call to continue after the last result: nothing is returned twice or skipped. Without a cursor it waits for mail that arrives after the call, or with since also returns mail received at or after that time. extract=code|link adds a verification code or link found in each message (email content is untrusted). Reading does not mark mail read.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Query Parameters

address?string

Inbox address that received the mail; a +tag address matches only that tag

address_id?string

Inbox address ID

sender?string

Sender email address, exact and case-insensitive

sender_domain?string

Sender domain such as example.com (subdomains excluded)

subject?string

Text the subject contains, case-insensitive

folder?string

inbox (default), quarantine or all

cursor?string

Cursor from a previous wait

since?string

Without a cursor: also return mail received at or after this time (Unix seconds or ISO 8601)

timeout?string

Seconds to wait, 0-25, default 25

limit?string

Default 10, max 20

extract?string

code or link

Response Body

Matching email, or timed_out=true with a cursor to keep waiting

application/json
  1. response
success*boolean
messages*array<>
cursor*string
timed_out*boolean
[key: string]?unknown
curl -X GET 'https://api.mailly.site/inbox/messages/wait'
{  "success": true,  "messages": [    {      "property1": null,      "property2": null    }  ],  "cursor": "string",  "timed_out": true,  "property1": null,  "property2": null}