Synology MailPlus icon

Synology MailPlus

Synology MailPlus API operations (18 endpoints + legacy support)

Legacy: List Messages

AI-generated

Summary

Retrieve a list of messages from a specified mailbox in Synology MailPlus using legacy API endpoints, supporting pagination and optional extra parameters for filtering or customization.

Inputs

  • Mailbox ID (required) — The ID of the mailbox from which to list messages.
  • Offset — The position offset from which to start listing messages, defaulting to 0.
  • Limit — The maximum number of messages to retrieve per request, default is 50.
  • Return All — Whether to retrieve all messages by fetching multiple pages automatically, default is false.
  • Extra Params (JSON) — Additional query parameters as a JSON object passed to the API call for further customization.

Output shape

A JSON object containing a success flag and data object. The data object includes an array of messages plus metadata such as offset and number of messages fetched.

If Return All is false, one API call is made returning up to Limit messages starting from Offset. If Return All is true, the operation fetches up to 100 pages incrementally to retrieve all messages, merging them into a single collection under data.messages.

Examples

Example 1: List first 50 messages from mailbox #1

Mailbox ID=1, Offset=0, Limit=50, Return All=false

Example 2: Retrieve all messages from mailbox #1 without limit using auto-pagination

Mailbox ID=1, Return All=true

Links

Discussion