The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about delpop

Discussion in 'cPanel Developers' started by danielati, Jan 18, 2012.

  1. danielati

    danielati Active Member

    Joined:
    Nov 7, 2011
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Hi,

    When I execute the delpop function...
    print $xmlapi->api1_query($account,'Email','delpop',array('test', 'domain.com'));

    appears the following result:

    <cpanelresult>
    <module>Email</module>
    <func>delpop</func>
    <type>event</type>
    <source>internal</source>
    <apiversion>1</apiversion>
    <data>
    <result/>
    </data>

    <event>
    <result>1</result>
    </event>
    </cpanelresult>

    Is it right?
    The result does not appear in data->result...
     
    #1 danielati, Jan 18, 2012
    Last edited: Jan 18, 2012
  2. danielati

    danielati Active Member

    Joined:
    Nov 7, 2011
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Hello everyone,

    I researched the api1 documentation and I found the answer:

    Returns:

    This function does not produce any output.


    But now I have other doubt.....
    When I use Api2 instead of Api1, the email account doesn't removed and appear the following:

    <cpanelresult>
    <apiversion>2</apiversion>

    <data>
    <reason>Account does not exist.</reason>
    <result>0</result>
    </data>

    <event>
    <result>1</result>
    </event>

    <func>delpop</func>
    <module>Email</module>
    </cpanelresult>


    print $xmlapi->api2_query($account,'Email','delpop', array($email,$domain) );
    Has something wrong on the line above?
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Yes, you're calling the function to make an API2 call, but that's not an API2 call. API1 has sequential parameters, API2 has named parameters. I'm not noticing any named parameters in that query - you can check api2_example_withargs.php to see what I am talking about more clearly.
     
Loading...

Share This Page