Description

This function checks whether Domain Keys Identified Mail (DKIM) is available on a server.


Examples 




https://hostname.example.com:2087/cpsess##########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=DKIMUI&cpanel_jsonapi_func=available



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Check whether DKIM is available on example.com.
$dkim_available = $cpanel->api2(
    'DKIMUI', 'available' 

    ) 
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Check whether DKIM is available on example.com.
my $dkim_available = $cpliveapi->api2(
    'DKIMUI', 'available',

);




cpapi2 --user=username DKIMUI available



{
  "cpanelresult": {
    "apiversion": 2,
    "func": "available",
    "data": [
      {
        "available": 1
      }
    ],
    "event": {
      "result": 1
    },
    "module": "DKIMUI"
  }
}



Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
availableBooleanWhether DKIM is available.
  • 1 — Available.
  • 0 — Unvailable.
1
reasonstring

A reason for failure.

This function only returns a reason value if there was an error. 


 A string that describes the error.This is an error message.
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1