Description
This function checks whether Greylisting is enabled for the cPanel account.
Examples
cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/cPGreyList/has_greylisting_enabled
LiveAPI PHP Class
$cpanel
=
new
CPANEL();
$has_greylisting_enabled
=
$cpanel
->uapi(
'cPGreyList'
,
'has_greylisting_enabled'
);
LiveAPI Perl Module
my
$cpliveapi
= Cpanel::LiveAPI->new();
my
$has_greylisting_enabled
=
$cpliveapi
->uapi(
'cPGreyList'
,
'has_greylisting_enabled'
,
);
cPanel Template Toolkit
[% execute('cPGreyList', 'has_greylisting_enabled',) %]
Command Line
uapi --user=username cPGreyList has_greylisting_enabled
|
Output (JSON)
{
"messages": null,
"errors": null,
"status": 1,
"metadata": {
},
"data": {
"enabled": 1
}
}
Parameters
This function does not accept parameters.
Returns
Return
|
Type
|
Description
|
Possible values
|
Example
|
enabled
|
Boolean
|
Whether Greylisting is enabled.
|
- 1 — Enabled.
- 0 — Disabled.
|
0
|