Results 1 to 2 of 2

Thread: changing email password with xmlapi

  1. #1
    Member
    Join Date
    Jun 2008
    Posts
    19

    Default changing email password with xmlapi

    This script is not changing the email password so what is wrong here ?
    PHP Code:
    include("xmlapi.php");

    $ip 'yourdomain.com';
    $root_pass 'cpanelpass';

    $account "cpaneluser";
    $email_account "youremail";
    $email_domain "yourdomain.com";
    $new_pass "newpass";

    $xmlapi = new xmlapi($ip);
                
    $xmlapi->set_port('2083');
    $xmlapi->password_auth($account,$root_pass);

    $args = array(
      
    'domain'=>$email_domain
      
    'email'=>$email_account,
      
    'password'=>$new_pass
    );

    $result $xmlapi->api2_query($account"Email""passwdpop "$args);  
                
    $xml_result = new SimpleXMLElement($result);    
                print 
    $xml_result
    I want to display the result of $xml_result

    I get an error for that so script change the password but I need to display the result of execute this script
    Last edited by bwor; 06-11-2012 at 12:46 PM.

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default Re: changing email password with xmlapi

    Before $result =, try adding the following code

    PHP Code:
    $xmlapi->set_debug(1); 

Similar Threads

  1. XMLAPI Email:storefilter no error, but doesnt save
    By cornfeedhobo in forum cPanel Developers
    Replies: 2
    Last Post: 12-13-2012, 09:57 PM
  2. Using cPanel API for changing email password
    By saliljain25 in forum cPanel Developers
    Replies: 3
    Last Post: 02-24-2011, 09:50 AM
  3. Changing email password using XML api
    By bwor in forum cPanel Developers
    Replies: 1
    Last Post: 10-21-2010, 09:25 PM
  4. Changing password in Cpanel does not change the password for FTP
    By WMS in forum cPanel & WHM Discussions
    Replies: 15
    Last Post: 07-23-2008, 08:02 AM
  5. Changing Password in Cpanel: Does FTP Password change too?
    By silversurfer in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 01-19-2003, 03:24 PM