UAPI Functions - Webmailapps::listwebmailapps

Description

This function lists the account's available webmail clients.

Examples 


 cPanel or Webmail Session URL

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

 LiveAPI PHP Class

$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',
          )
);

 LiveAPI Perl Module

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',
    }
);

 cPanel Template Toolkit

<!-- 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('Webmail', 'list_webmail_apps', { 'theme' => 'paper_lantern', } ).data.id %]

 Command Line

uapi --user=username Webmailapps list_webmail_apps theme=paper_lantern

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

{
  "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",
    }
  ]
}

 

Note:

Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

 Parameter 

Type

Description

Possible values

Example

theme

 string 

The webmail theme.

 This parameter defaults to x3. 

 A valid theme on the server. 

 paper_lantern 

 

Returns

Output

Type

Description

Possible values

Example

icon

string

The icon file.

 An icon file's path, relative to the/usr/local/cpanel/base/frontenddirectory. 

/webmail/paper_lantern/images/roundcube_logo.png

url

string

The webmail client's URL.

A valid string.

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

 displayname 

string

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

A valid string.

RoundCube

id

 string 

The webmail client's ID.

A valid string.

roundcube

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....