Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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 Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jcorreia

    jcorreia Well-Known Member

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice