Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetAllAccounts does not display all accounts #57

Open
r-bauduin opened this issue Mar 22, 2023 · 1 comment
Open

GetAllAccounts does not display all accounts #57

r-bauduin opened this issue Mar 22, 2023 · 1 comment

Comments

@r-bauduin
Copy link

Hello,

here is my simple PHP function to get all mailboxes of a domain :

        $result = $api->GetAllAccounts($server,$domainReq);

        if(!is_null($result->account)) {
            foreach ($result->account as $account) {
                $r['accounts'][] = $account->name;
            }
        }

Unfortunately, this does not display all accounts :

Result =
"accounts": [
"aaaa@testmail.net",
"bbb@testmail.net",
"ccc@testmail.net",
"ddd@testmail.net",
"fff@testmail.net",
"hhh@testmail.net",
"iii@testmail.net",
"kkk@testmail.net",
"lll@testmail.net",
"nnn@testmail.net",
"rrr@testmail.net",
"sss@testmail.net"
]

With zmprov :

zimbra@proxy1:~$ zmprov -l gaa testmail.net
aaaa@testmail.net
bbb@testmail.net
ccc@testmail.net
ddd@testmail.net
eee@testmail.net
fff@testmail.net
ggg@testmail.net
hhh@testmail.net
iii@testmail.net
jjj@testmail.net
kkk@testmail.net
lll@testmail.net
mmm@testmail.net
nnn@testmail.net
ooo@testmail.net
ppp@testmail.net
qqq@testmail.net
rrr@testmail.net
sss@testmail.net
ttt@testmail.net

This is the same with other domains.

Do you have a solution?

@nguyennv
Copy link
Contributor

You can use $api->searchDirectory() with $types is "accounts"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants