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.

addforward aPI1 bad args in documentation

Discussion in 'cPanel Developers' started by jcorreia, Mar 1, 2010.

  1. jcorreia

    jcorreia Well-Known Member

    Joined:
    Apr 25, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Hi,
    I was struggling to make email addforward work with API1 and API2 without any sucess, after reading documentation and forum posts.
    I´ve managed to make it work with API1 but found that the documentation is wrong.
    Here ApiEmail < ApiDocs < TWiki

    says the args are domain, email, fwemail, pipefwd
    But although the return is ever 1(bug ??), it wasn´t creating it in cpanel.

    I´ve managed to make it work with

    Code:
    $args=array(
        $email_account,
        "test@yahoo.com",
        $email_domain    
            
    );
    $result=$xmlapi->api1_query($account, "Email", "addforward",$args);
    var_dump($result);
    
    So, my question is...Will it be broken in future or is it the documentation that has it wrong ?

    Thanks
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I apologize for the inconvenience. This function is not broken - rather the API docs were incorrect.

    ApiEmail < ApiDocs < TWiki

    What was needed was having "fwdopt=fwdemail" in the API call. The documentation has been adjusted, my apologies.
     
  3. jcorreia

    jcorreia Well-Known Member

    Joined:
    Apr 25, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Thanks,
    glad to help :)
     
Loading...

Share This Page