Description

This function deletes a mail exchanger.


Examples 




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$del_mx = $cpanel->api1('Email', 'delmx', array('example.com', 'mail.example.com', '15') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $del_mx = $cpliveapi->api1('Email', 'delmx', ['example.com', 'mail.example.com', '15'] ); # Call the function.

 


<cpanel Module="Email::delmx( $FORM('domain','exchange','preference') )">




cpapi1 --user=username Email delmx example.com mail.example.com 15


This function does not return output.



Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain name.

A valid domain on the server.

example.com
exchangestring

Required

The mail exchanger's name.

The mail exchanger's name in name.example.com format, where example.com represents the domain name.mail.example.com
preferenceinteger

Required

The mail exchanger's priority.

For more information about priority levels, read our Edit MX Entry documentation.

If multiple MX entries match the  exchange value, the system uses this parameter to find the correct entry.  


An integer value.

It is common practice to set a priority value that you can divide by five.


15

Returns

This function does not return output.