zmtest.php 663 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. ini_set('soap.wsdl_cache_enabled',0);
  3. ini_set('soap.wsdl_cache_ttl',0);
  4. require_once("config.php");
  5. require_once("Zm/Auth.php");
  6. require_once("Zm/Account.php");
  7. require_once("Zm/Domain.php");
  8. require_once("Zm/Server.php");
  9. $auth = new Zm_Auth($zimbraServer, $zimbraAdminEmail, $zimbraAdminPassword, "admin");
  10. $l = $auth->login();
  11. if(is_a($l, "Exception")) {
  12. echo "Error : cannot login to $zimbraServer\n";
  13. echo $l->getMessage()."\n";
  14. exit();
  15. }
  16. $accountManager = new Zm_Account($auth);
  17. $r = $accountManager->accountExists("test3@thurdata.local");
  18. echo "$r\n";
  19. $r = $accountManager->accountExists("test5@thurdata.local");
  20. echo "$r\n";