Description

This function checks whether an email account possesses administrative privileges on any mailing lists.


We strongly recommend that you use the following UAPI function instead of this function:

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Email&cpanel_jsonapi_func=has_delegated_mailman_lists&delegate="user@example.com"



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Check whether user@example.com is a mailing list admin.
$is_list_admin = $cpanel->api2(
    'Email', 'has_delegated_mailman_lists', 
    array(
        'delegate'        => 'user@example.com', 
    ) 
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Check whether user@example.com is a mailing list admin.
my $is_list_admin = $cpliveapi->api2(
    'Email', 'has_delegated_mailman_lists',
    { 
        'delegate'        => 'user@example.com', 
    }
);




cpapi2 --user=username Email has_delegated_mailman_lists delegate=user%40example.com



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



Parameters

ParameterTypeDescriptionPossible valuesExample
delegatestring

Required

The email address.

A valid email address.

user@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
has_delegated_mailman_listsBooleanWhether the email address possesses administrative privileges on one or more mailing lists on the cPanel account.
  • 1 — The email address possesses administrative privileges.
  • 0 — The email address does not possess administrative privileges.
1
reasonstring

A reason for failure.

This function only returns a reason value if it failed. 


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