Skip to main content

Changing Email Password through API

Comments

3 comments

  • cPanelMichael
    Hello :) As far as the first question, I believe you are looking for:
    0
  • iSofia
    Hi Michael, and thanks for the quick reply. This script is to be run on the host server itself, to try and initiate a password change for one of the email accounts (john@abc.com) hosted on the same server. Sometimes I get no output, and sometimes I get this error: {"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}} Still stuck. :(
    0
  • iSofia
    Problem solved! The code is perfect, except for this one oversight on my part: $xmlapi->password_auth("root", $root_pass);
    I simply changed the string "root" to the actual cPanel username, which is "xyzusa" in the example. Thank you, David Neimeyer, for this great piece of code. :)
    0

Please sign in to leave a comment.