Description

This function lists the account's available webmail clients.

Examples 




https://hostname.example.com:2083/cpsess##########/execute/WebmailApps/list_webmail_apps?theme=paper_lantern



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Lists the webmail clients that are available for the account.
$list_webmail_apps = $cpanel->uapi(
    'WebmailApps', 'list_webmail_apps',
    array(
        'theme'  => 'paper_lantern',
          )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Lists the webmail clients that are available for the account.
my $list_webmail_apps = $cpliveapi->uapi(
    'WebmailApps', 'list_webmail_apps',
    {
        'theme'    => 'paper_lantern',
    }
);

 



<!-- Get a hash of webmail apps, then display the id only. -->
[% data = execute('WebmailApps', 'list_webmail_apps', { 'theme' => 'paper_lantern', } ) %]
[% FOREACH q = data.id %]
     <p>
         [% q %]
     </p>
[% END %]
     
<!-- Get only the id. -->
[% execute('WebmailApps', 'list_webmail_apps', { 'theme' => 'paper_lantern', } ).data.id %]



uapi --user=username WebmailApps list_webmail_apps theme=paper_lantern



{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    "transformed": 1
  },
  "data": [
    {
      "icon": "/webmail/paper_lantern/images/horde.gif",
      "url": "/cpsess##########/horde/index.php?cpanel=1",
      "displayname": "Horde",
      "id": "horde",
    },
    {
      "icon": "/webmail/paper_lantern/images/roundcube_logo.png",
      "url": "/cpsess##########/3rdparty/roundcube/index.php",
      "displayname": "Roundcube",
      "id": "roundcube",
    },
    {
      "icon": "/webmail/paper_lantern/images/squirrelmail_logo.gif",
      "url": "/cpsess##########/3rdparty/squirrelmail/index.php",
      "displayname": "SquirrelMail",
      "id": "sqmail",
    }
  ]
}



Parameters

ParameterTypeDescriptionPossible valuesExample
themestring

The webmail theme.

This parameter defaults to the server's default theme.

A valid theme on the server.

paper_lantern

Returns

OutputTypeDescriptionPossible valuesExample
iconstringThe icon file.An icon file's path, relative to the /usr/local/cpanel/base/frontend directory.
/webmail/paper_lantern/images/roundcube_logo.png
urlstring

The webmail client's URL.

A valid string.

/cpsess##########/3rdparty/roundcube/index.php
displaynamestring

The webmail client name, as it will display in the interface.

A valid string.

Roundcube
idstringThe webmail client's ID.A valid string.
roundcube