Child pages
  • UAPI Functions - Email::remove_mailman_delegates

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


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

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$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',
         )
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink



Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
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',
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink




Expand
titleCommand Line


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

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


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


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote



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.

Note
titleNote:

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