Child pages
  • UAPI Functions - Email::get_webmail_settings

Versions Compared

Key

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

Description

Excerpt

This function retrieves an email account's Webmail settings.

Multiexcerpt include
SpaceWithExcerptLIB
MultiExcerptNameAPIDisabledReceiveMailRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

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/get_webmail_settings?account=user


Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List webmail settings for user@example.com.
$webmail = $cpanel->uapi(
    'Email', 'get_webmail_settings',
    array(
        'account'      => 'user',
        )
);

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 settings for user@example.com.
my $webmail = $cpliveapi->uapi(
    'Email', 'get_webmail_settings',
    {
        'account'      => 'user',
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink




Expand
titleCommand Line


Code Block
languagebash
uapi --user=username Email get_webmail_settings account=user@example.com

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":{  
      "domain":"mail.example.com",
      "user":"user",
      "has_maildir":1
   }
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
accountstring

The mail account's username.

If you do not specify a value, the function retrieves settings for the cPanel account's default mail account.

A mail account username on the cPanel account.

For example, user if the email address is user@example.com.

user@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
domainstringThe email account's domain.A valid domain on the cPanel account.example.com

user

string

The email account username.

A valid email account username on the cPanel account.

user

has_maildir

Boolean

Whether Webmail is enabled for the email account.

  • 1 — Enabled.
  • 0 — Disabled.
1