Description
This function retrieves a domain's mail exchanger's type. For more information about MX record settings, read our Edit MX Entry documentation.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
The domain. If you do not use this parameter, the function lists data for all of the account's domains. |
A valid domain on the cPanel account. |
example.com |
Returns
Return |
Type |
Description |
Possible values |
Example |
domain |
string |
The domain name. |
A valid domain on the cPanel account. |
example.com |
mxcheck |
string |
The mail exchanger type. |
|
auto |
alwaysaccept |
Boolean |
Whether the domain accepts local mail. |
|
1 |
reason |
string |
A reason for failure. Note: This function only returns areason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |