Remote API / Retrieve email list

Discussion in 'Plugins/Modules/Addons' started by kinai, Mar 18, 2017.

  1. kinai

    kinai Member

    Hi all,
    I'm need to retrieve the email mailbox list for each off my client account by the remote api.
    I found the method to retrieve a user mailbox information, but not to retrieve all mailboxes for a specific client.
    Thanks for help,
    Regards,
    Yannick
     
  2. liane

    liane Member HowtoForge Supporter

    you first need to retrieve the groupid of the client
    PHP:
    // for client ID 1
    $client_id 1;
    // get the sys_groupid of this client
    $groupid $client->client_get_groupid($session_id$client_id);
    then, you can ask for all mailboxes for this client
    PHP:
    // fetch all mails for this client
    $mail_user_records $client->mail_user_get($session_id, array('sys_groupid' => $groupid));
    // do your stuff
    print_r($mail_user_records);
     
    till likes this.
  3. kinai

    kinai Member

    thanks, i test that.
     

Share This Page