Description

This function removes an account's mailing list administrative privileges.


Examples 




https://hostname.example.com:2083/cpsess##########/execute/Email/remove_mailman_delegates?list=mylist&delegates=user%40example.com%2Cadmin%40example.com



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Remove user@example.com and admin@example.com as admins.
$delete_admin = $cpanel->uapi(
    'Email', 'remove_mailman_delegates',
    array(
        'list'        => 'mylist',
        'delegate'    => 'user@example.com,admin@example.com',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Remove user@example.com and admin@example.com as admins.
my $delete_admin = $cpliveapi->uapi(
    'Email', 'remove_mailman_delegates',
    {
        'list'        => 'mylist',
        'delegate'    => 'user@example.com,admin@example.com',
    }
);

 



<!-- Remove user@example.com and admin@example.com as admins. -->
[% execute('Email', 'remove_mailman_delegates', { 'list' => 'mylist', 'delegate' => 'user@example.com,admin@example.com', }) %]

 



uapi --user=username Email remove_mailman_delegates list=mylist delegates=user%40example.com%2Cadmin%40example.com



{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": {
    "delegates": [
      "secondadmin@example.com",
    ],
  "metadata": {
    "transformed": 1
  }
}




Parameters

ParameterTypeDescriptionPossible valuesExample
liststring

Required

The mailing list.

The name of a Mailman mailing list on the cPanel account.mylist
delegatesstring

Required

A list of the administrators to remove.

One or more email addresses.

Separate multiple email addresses with commas. 


user@example.com,admin@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
delegatesarray

An array of the mailing list's administrators.

One or more email addresses.

secondadmin@example.com