Email

Sends a test email to trigger the worker's email() handler. Only the first to address is used as the envelope recipient; any additional to and cc addresses appear only in the composed MIME headers. bcc addresses are accepted but, by convention, are not written into the composed message.

post/local/email/routing/send

Request

  • Base URL: /cdn-cgi/local/explorer/api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /cdn-cgi/local/explorer/api/local/email/routing/send
  • Auth: none declared

Query parameters

workerstring required

Deliver the test email directly to this worker's email() handler. Required because a single dev port can serve multiple workers, so the target cannot be inferred from the recipient address.

Request body

fromstring required

Sender address.

tostring[] required

Recipient addresses.

ccstring[]
bccstring[]
replyTostring
subjectstring required
textstring

Plain text body.

htmlstring

HTML body.

headersobject

Custom headers to include on the message.

Response

Send test email response.

successtrue required

Whether the API call was successful.

Example response

{
  "errors": [],
  "messages": [],
  "success": true
}

Changes