|
|
@@ -178,9 +178,10 @@ class Settings extends DataTable implements ClientArea
|
|
|
public function loadData()
|
|
|
{
|
|
|
$maildomain = $this->getWhmcsParamByKey('domain');
|
|
|
+ $mailserver = $this->getWhmcsParamByKey('serverhostname');
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
|
- $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
+ $api->login($mailserver, $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
$domains = $api->getDomains(['id','name','aliasList']);
|
|
|
$dkimSet = $api->getDkimDnsRecord($maildomain);
|
|
|
} catch (KerioApiException $error) {
|
|
|
@@ -233,14 +234,14 @@ class Settings extends DataTable implements ClientArea
|
|
|
if(empty($dnsRecords['mx'])){
|
|
|
$mx = 'unset';
|
|
|
} else {
|
|
|
- in_array($params['serverhostname'],$dnsRecords['mx']) ? $mx = 'set' : $mx = 'wrong';
|
|
|
+ in_array($mailserver,$dnsRecords['mx']) ? $mx = 'set' : $mx = 'wrong';
|
|
|
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
__FUNCTION__,
|
|
|
- $params['serverhostname'],
|
|
|
+ $mailserver,
|
|
|
'Debug Error',
|
|
|
- $dnsRecords['mx']
|
|
|
+ $params['userid']
|
|
|
);
|
|
|
|
|
|
}
|