Child pages
  • cPanel API 1 Functions - Email::delmx

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function deletes a mail exchanger.


Warning
titleWarning:

Include Page
LIB:_cPanelAPI1NewerFunctions
LIB:_cPanelAPI1NewerFunctions

  • UAPI (recommended) Email::delete_mx
    Excerpt Include
    DD:UAPI Functions - Email::delete_mxDD:
    UAPI Functions - Email::delete_mx
    nopaneltrue
  • cPanel API 2 Email::delmx
    Excerpt Include
    DD:cPanel API 2 Functions - Email::delmxDD:
    cPanel API 2 Functions - Email::delmx
    nopaneltrue

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledDNSRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$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.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
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.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 


Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

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



Expand
titleCommand Line


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

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote


Expand
titleOutput (none)

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.

Note
titleNote:

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


An integer value.

Note
titleNote:

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


15

Returns

This function does not return output.