Hello friends,
I want to list all the mails that have an entry in my ldap server.
My code is:
LdapConnection connection =new LdapNetworkConnection(hostname));
connection().bind(adminLDAP, password);
ArrayList<String> mailList = new ArrayList<String>();
EntryCursor cursor = connection().search( dnUser, "(mail=*)",
SearchScope.SUBTREE );
Entry resultSearch= null;
while ( cursor.next() )
{
resultSearch = cursor.get();
Attribute attr = resultSearch.get("mail");
mailList.add(attr.getString());
}
This code lists only one mail for each of the entry not everyone who has.
I need help with this
thank you very much
|