Description
This function lists the account's mail domains.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
select |
string |
The name of the domain that the function returns with theselect output parameter. If you do not use this parameter, the function will not return the select parameter with any domains. |
A valid domain on the account. |
example.com |
add_www |
Boolean |
Whether to list www.addresses. This parameter defaults to 0. |
For example, if you specify 1, the function's output would include both example.com andwww.example.com. If you specify 0, the output would include only example.com. |
1 |
include_wildcard |
Boolean |
Whether to list wildcard addresses. This parameter defaults to 0. |
For example, if you specify 1, the function's output would include both example.com and*.example.com. If you specify 0, the output would include only example.com. |
1 |
Returns
Note:
This function always returns the account's main domain first.
Return |
Type |
Description |
Possible values |
Example |
domain |
string |
The domain name. |
The name of a main domain, addon domain, or subdomain on the cPanel account. |
example.com |
select |
Boolean |
A Boolean value that marks the domain that you specified in the select input parameter. The function only returns this value if you included the select parameter when you called the function. |
1 is the only possible value. Note: Because this value only appears if you included the select input parameter, The value always defaults to 1. |
1 |