Description
This function lists all of a cPanel account's mail domains, with the main domain preselected.
Examples
LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$list_mail_domains = $cpanel->api1('Email', 'listmaildomains') ); // Call the function.
LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $list_mail_domains = $cpliveapi->api1('Email', 'listmaildomains'); # Call the function.
cPanel Tag System (deprecated)
Warning:
In cPanel & WHM version 11.30 and later, cPanel tags are deprecated. This example is present in order to help developers move from the old cPanel tag system to our LiveAPI.
We strongly recommend that you only use the LiveAPI system to call the cPanel APIs.
<cpanel Module="Email::listmaildomains() )">
Output (HTML)
<option value="example.com" selected>example.com</option>
<option value="exampledomain.com">exampledomain.com</option>
<option value="domain.com">domain.com</option>
Parameters
This function does not accept parameters.
Returns
This function returns a list of each mail domain on the account, wrapped in <option>
tags.
The cPanel account's main domain will automatically include the selected
option in its <option>
tag.