Description

This function lists all of a cPanel account's mail domains, with the main domain preselected.


Examples 




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$list_mail_domains = $cpanel->api1('Email', 'listmaildomains') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $list_mail_domains = $cpliveapi->api1('Email', 'listmaildomains'); # Call the function.


<cpanel Module="Email::listmaildomains() )">




cpapi1 --user=username Email listmaildomains



<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 automatically includes the selected option in its <option> tag.