Home / Mail / listByFolder
Get a list of all Mail Id + name by folder id (Open mails are not being showed).
The following errors can occur:
- Token not present in request.
- Token not in the required format.
- Session does not exist.
- Session has expired.
- The user does not exist.
- No database specified.
- Database parameter not in correct format.
- You are not allowed to access this database.
You should call this function as followed:
- rest/v2/link/listByFolder?token=TOKEN&database=DATABASE_ID&folder_id=FOLDER_ID&offset=OFFSET&records=NUMBER_OF_RECORDS
require_once 'Rest.php';
$username = 'my_username';
$password = 'my_password';
$database = '999';
$rest = new Rest($username, $password, $database);
$result = $rest->call('mail/listByFolder', [
'folder_id' => 'FOLDER_ID',
'offset' => 'OFFSET',
'records' => 'NUMBER_OF_RECORDS'
], 'POST');
var_dump($result);
The following parameters this method can/should be called with:
key: folder_id
values: integer, Required
what: Id of the folder
key: offset
values: integer, >= 0 & <= count, defaults to 0, not required
what: The offset the result-list should start at.
key: records
values: integer, >= 5 & <= 100, defaults to 25, not required
what: How much records you want to retrieve
The following items:
- user/login For the TOKEN
- user/database For the DATABASE_ID