Child pages
  • cPanel API 2 Functions - WebmailApps::listwebmailapps

Versions Compared

Key

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

Description

Excerpt

This function retrieves information about an account's Webmail applications.


Warning
titleWarning:
  • We strongly recommend that you use the following UAPI function instead of this function:
    • Webmailapps::listwebmailapps

      Excerpt Include
      DD:UAPI Functions - WebmailApps::listwebmailapps
      DD:UAPI Functions - WebmailApps::listwebmailapps
      nopaneltrue

  • We deprecated and removed this function in cPanel & WHM version 11.44. For help to update custom code that uses this function, send an email to integration@cpanel.net.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledWebmailRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleWHM API (JSON)


Code Block
languagetext
https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=WebmailApps&cpanel_jsonapi_func=listwebmailapps

Include Page
LIB:_CallFromWHMAPILink
LIB:_CallFromWHMAPILink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List Webmail applications
$list_webmail = $cpanel->api2(
    'WebmailApps', 'listwebmailapps'
);

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.
 
# List Webmail applications
my $list_webmail = $cpliveapi->api2(
    'WebmailApps', 'listwebmailapps',
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 


Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelAPI2cPanelTagsWarning
LIB:_cPanelAPI2cPanelTagsWarning


Expand
titleCommand Line


Code Block
languagebash
Because we removed this function before we introduced this functionality, you cannot call this function via the command line.

Include Page
LIB:_cPanelAPI2CLINote
LIB:_cPanelAPI2CLINote


Expand
titleOutput (JSON)


Code Block
linenumberstrue
{
  "cpanelresult": {
    "apiversion": 2,
    "func": "listwebmailapps",
    "data": [
      {
        "feature": "horde",
        "icon": "/webmail/x3mail/images/horde.gif",
        "url": "/cpsess1658535621/horde/index.php?cpanel=1",
        "id": "horde",
        "displayname": "Horde",
        "if": "!$CONF{'skiphorde'}"
      },
      {
        "icon": "/webmail/x3mail/images/roundcube_logo.png",
        "url": "/cpsess1658535621/3rdparty/roundcube/index.php",
        "id": "roundcube",
        "displayname": "RoundCube",
        "if": "!$CONF{'skiproundcube'}"
      },
      {
        "feature": "sqmail",
        "icon": "/webmail/x3mail/images/squirrelmail_logo.gif",
        "url": "/cpsess1658535621/3rdparty/squirrelmail/index.php",
        "id": "sqmail",
        "displayname": "SquirrelMail",
        "if": "!$CONF{'skipsqmail'}"
      }
    ],
    "event": {
      "result": 1
    },
    "module": "WebmailApps"
  }
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

This function does not accept parameters.

Returns

ParameterTypeDescriptionPossible valuesExample
featurestringThe Webmail application's feature name.A valid string.horde
iconstringThe path to the Webmail application's icon file.A valid file path, relative to the home directory.
/webmail/x3mail/images/horde.gif
urlstringThe URL to the Webmail application's location.A valid URL, relative to the home directory.
/cpsess1658535621/horde/index.php?cpanel=1
idstringThe Webmail application's ID.A valid string.horde
displaynamestringThe Webmail application's display name.A valid string.
Horde
ifstring

The conditional statement that the interface uses to determine whether to display the Webmail application.

A conditional statement.

For more information, read this Stackoverflow article.

!$CONF{'skiphorde'}
reasonstring

A reason for failure.

Note
titleNote:

This function only returns a reason value if it failed.


A string that describes the error.

This is an error message.
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1