Pagination
By default, the message search or list commands return the first 10 results of the matching criteria. However, you can customize the pagination by using the start and limit command.
Command for pagination:
message list --start <value> --status <Read/Unread> --limit <limit value> --account<account name>
Note:
If account name/id is not provided, you will be prompted to select an account before proceeding.
For example:
message list --start 4 --status read --limit 20 --account johnm
This command lists the results of READ mails from the 4th till 20th position in your mailbox.
--start <number> - Start index (0-based)
--limit <number> -Number of messages to retrieve
Message list command
Copiedzmail:>message list --start 4 --status read --limit 20 --account johnmOutput
Copied+---------------------+--------------------------------------------------------------------------------+---------------------------------------+----------------------------------+
| Message Id | Subject | From Address | To Address |
+---------------------+--------------------------------------------------------------------------------+---------------------------------------+----------------------------------+
| 1****************0 | ZohoMail - New login activity | noreply@zoho.com | <johnm@zylkertraining.com> |
+---------------------+--------------------------------------------------------------------------------+---------------------------------------+----------------------------------+
| 5****************7 | ZohoMail - New login activity | noreply@zoho.com | <johnm@zylkertraining.com> |
+---------------------+--------------------------------------------------------------------------------+---------------------------------------+----------------------------------+
| 1****************9 | Microsoft Outlook Test Message | johnm@zylkertraining.com | <johnm@zylkertraining.com> |
+---------------------+--------------------------------------------------------------------------------+---------------------------------------+----------------------------------+
| 1****************8 | Congratulations! *************************************** | information@zylkertraining.com | <johnm@zylkertraining.com> |
| | | | |
+---------------------+--------------------------------------------------------------------------------+---------------------------------------+----------------------------------+
| 1****************3 | Congratulations! ************************************************* | information@zylkertraining.com | <johnm@zylkertraining.com> |
| | | | |Use the following commands to navigate through pages.
To view the next page of the result
next
You can run the above command to view the next page of the result, as only the first 10 rows of the command are displayed.
Command to view the next page of the result
Copiedzmail:>nextTo view the previous page:
previous
Command to view the previous page of the result
Copiedzmail:>previousNote:
The next and previous commands are run for the last search or list command with the options. The tool remembers the details when navigating the pages using next or previous commands.