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


$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="" selected></option>
<option value=""></option> 
<option value=""></option> 


This function does not accept parameters.


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.