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.

API "addforward" function doesn't work

Discussion in 'cPanel Developers' started by lvt, Jun 16, 2009.

  1. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    I don't know why this function doesn't work for me.

    Can someone please give me an example of the API call for the "addforward" function (in XML style) that worked for you.

    Thanks.
     
  2. 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
    Which addforward function are you referring to? Email::addforward in API2 for creating email forwarders?
     
  3. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Yes, I want to use "Email :: addforward" to create a forwarder, all other functions work fine (addpop, delpop, passwdpop...), except this one.
     
  4. 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
    You can find the documentation for this function at:

    Api2AddForwarder < AllDocumentation/AutomationIntegration < TWiki

    Here's a URL I used for creating an email account:

    Code:
    https://SERVER:2087/xml-api/cpanel?user=USERNAME&xmlin=<cpanelaction><module>Email</module><func>addforward</func><args><email>test</email><domain>example.net</domain><fwdopt>fwd</fwdopt><failmsgs></failmsgs><pipefwd></pipefwd><fwdemail>destination@example.com</fwdemail></args></cpanelaction>
     
  5. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Thanks David, it works fine with your example and after verifying my code there is something like <args> to remove from it.
     
Loading...

Share This Page