I have a script that uses the cPanel XML API2 to set up a domain with the MX entries required to forward mail to Google Apps (7 different MX entries with varying priorities).
Since by default every domain in our system has an MX entry that points to itself with a priority of 0, I set up the first part of my Google Apps script to check for this original MX entry and delete it before adding the new ones.
Using the Email::listmx function I can find the entry fine, and then the script uses the Email::delmx function (with all three parameters) to attempt to delete that original entry. The delmx function comes back with a result of 1 (success), and then when I log in to cPanel and check the MX entries for the domain it says there aren't any.
However when I run the listmx function again for that domain it still shows the original MX entry. It also shows up in WHM.
Any ideas? Thanks!
Since by default every domain in our system has an MX entry that points to itself with a priority of 0, I set up the first part of my Google Apps script to check for this original MX entry and delete it before adding the new ones.
Using the Email::listmx function I can find the entry fine, and then the script uses the Email::delmx function (with all three parameters) to attempt to delete that original entry. The delmx function comes back with a result of 1 (success), and then when I log in to cPanel and check the MX entries for the domain it says there aren't any.
However when I run the listmx function again for that domain it still shows the original MX entry. It also shows up in WHM.
Any ideas? Thanks!