|
|
@@ -67,6 +67,13 @@ class Aliases extends DataTable implements ClientArea
|
|
|
*/
|
|
|
$hosting = Hosting::where('id', $this->getRequestValue('id'))->first();
|
|
|
|
|
|
+ $fields = array(
|
|
|
+ "id",
|
|
|
+ "name",
|
|
|
+ "deliverToId",
|
|
|
+ "deliverTo",
|
|
|
+ "type");
|
|
|
+
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
@@ -87,13 +94,25 @@ class Aliases extends DataTable implements ClientArea
|
|
|
$this->maildomain = $maildomain['name'];
|
|
|
}
|
|
|
}
|
|
|
+ try {
|
|
|
+ $aliases = $api->getAliases($fields,$this->maildomainID);
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $error,
|
|
|
+ 'Debug Error',
|
|
|
+ $error->getMessage()
|
|
|
+ );
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
+ }
|
|
|
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
__FUNCTION__,
|
|
|
$this->maildomainID,
|
|
|
'Debug Error',
|
|
|
- $this->maildomain
|
|
|
+ $aliases
|
|
|
);
|
|
|
|
|
|
$api->logout();
|