You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

Child pages
  • UAPI Functions - WebmailApps::listwebmailapps
Skip to end of metadata
Go to start of metadata

Description

This function lists the account's available webmail clients.

Important:

In cPanel & WHM version 76 and later, when you disable the Receive Mail role, the system disables this function.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/WebmailApps/list_webmail_apps?theme=paper_lantern


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

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


Note:

For more information, read our Guide to the LiveAPI System.


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


Note:

For more information, read our Guide to the LiveAPI System.


 Command Line
uapi --user=username WebmailApps list_webmail_apps theme=paper_lantern


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 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 (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

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