|
|
@@ -141,6 +141,21 @@ class Aliases extends DataTable implements ClientArea
|
|
|
* hosting model
|
|
|
*/
|
|
|
$hosting = Hosting::where('id', $hid)->first();
|
|
|
+ $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
+ try {
|
|
|
+ $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
+// $domains = $api->getDomains(['id','name']);
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $error,
|
|
|
+ 'Debug Error',
|
|
|
+ $error->getMessage()
|
|
|
+ );
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
+ }
|
|
|
+ $api->logout();
|
|
|
|
|
|
/* $accounts =(new KerioManager())
|
|
|
->getApiByHosting($hid)
|
|
|
@@ -154,7 +169,7 @@ class Aliases extends DataTable implements ClientArea
|
|
|
__FUNCTION__,
|
|
|
$hosting,
|
|
|
'Debug Error',
|
|
|
- $accounts
|
|
|
+ $$this->maildomain
|
|
|
);
|
|
|
|
|
|
return FALSE;
|