Email Service

Virtual mailbox (disposable email): generate a random address to receive mail, handy for sign-up verification, integration testing and automation.

/api/VMEmail_mailcx/

Service Description

The Email Service provides a virtual (disposable) mailbox: a random local address with no sign-up needed that can receive mail — handy for sign-up verification, integration testing and automation. (The former "send email" feature is now merged into the Message Push Service: POST /api/push/email/send.)

This service requires a project signature.

Temporary mailbox polling is long-polling: when there is no new mail the request hangs for about 25 seconds before returning an empty list. This is expected, so do not treat it as a failure based on a short timeout. Mail is retained for a limited time, so retrieve anything important promptly.

Response Format

Every endpoint returns the same JSON envelope; the payload is always inside data:

{
  "code": 10000,
  "msg": "成功",
  "data": { ... }
}
  • code: business status code. 10000 means success; anything else is an error — see the Error Codes page for the full list.
  • msg: a human-readable message you can show to end users, but never use it for program logic.
  • data: the payload; usually null on error. Each endpoint's Response section lists its data fields.

Judge success by code, not by the HTTP status code. View all error codes

VMEmail(mail.cx)

VMEmail (mail.cx) temporary mailbox (receive only) Signature Required

mail.cx temporary mailbox: the address is generated locally at random with no registration, and the address itself is the unique identifier (mail is kept for about 1 hour); the server keeps no session, so queries must send the address back. Requires a project signature.

GET /api/VMEmail_mailcx/domains Total calls: 0

Get Available Domains

Get all currently available suffix domains, used to specify domain when generating a mailbox.

Response Common envelope

data is a string array of available suffix domains; falls back to the built-in default domains when the upstream fails.

Example response
["ddker.com", "9k3r.com", "uqu.me"]
POST /api/VMEmail_mailcx/generate Total calls: 0

Generate Temporary Mailbox

Generate a temporary mailbox address (receive only) and return the address and the client ID.

Optional: specify the suffix domain; defaults to uqu.me

Optional: client identifier (X-Client-ID); if omitted the server generates one at random, and reusing an existing value reuses the same identity

  • The request body is an application/x-www-form-urlencoded form.
Response Common envelope
Field Type Description
address string Temporary email address
domain string Suffix Domain
client_id string Client ID, pass it back when fetching emails
Example response
{"address": "abc123@uqu.me", "domain": "uqu.me", "client_id": "0f8b2e1c-3a4d-4f6e-9c12-7d5a8b3e2f01"}
GET /api/VMEmail_mailcx/emails Total calls: 0

Get Email List

Fetch the mail summary list of a mailbox (long polling; hangs for about 25 seconds and returns an empty list when there is no new mail).

Required: mailbox address, from the response of Generate Temporary Mailbox

Optional: non-negative integer timestamp (seconds); if omitted all current mail is returned, otherwise only mail newer than that time

Optional: keep it the same as the client_id used when generating the mailbox

  • The upstream uses long polling: with no new mail it hangs for about 25 seconds before returning an empty list, so the client HTTP timeout should exceed 35 seconds.
  • Use the id from the list to fetch the full body via “Get email detail”.
Response Common envelope

data is the email summary list from the upstream mail.cx service; each item contains fields such as id / from_name / from_email / subject / preview_text / preview_status / size / created_at — refer to the actual response.

GET /api/VMEmail_mailcx/email_detail Total calls: 0

Get Mail Detail

Get the full detail by mail id (including the complete body and attachments).

Required: unique mail identifier (max length 128)

Optional: keep it the same as the client_id used when generating the mailbox

  • Returns 20030 when the mail does not exist (or has expired, since mail is kept for about 1 hour).
Response Common envelope

data is the raw email-detail JSON returned by the upstream mail.cx service, containing fields such as id / from / from_email / from_name / to / subject / text_body / html_body / attachments / date / created_at — refer to the actual response.

XiaoYingAPI · Unified API Aggregation Service