Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    lvt
    lvt is offline
    Member
    Join Date
    May 2009
    Posts
    36

    Default API "addforward" function doesn't work

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    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.
    Which addforward function are you referring to? Email::addforward in API2 for creating email forwarders?

  3. #3
    lvt
    lvt is offline
    Member
    Join Date
    May 2009
    Posts
    36

    Default

    Quote Originally Posted by cPanelDavidG View Post
    Which addforward function are you referring to? Email::addforward in API2 for creating email forwarders?
    Yes, I want to use "Email :: addforward" to create a forwarder, all other functions work fine (addpop, delpop, passwdpop...), except this one.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    Yes, I want to use "Email :: addforward" to create a forwarder, all other functions work fine (addpop, delpop, passwdpop...), except this one.
    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. #5
    lvt
    lvt is offline
    Member
    Join Date
    May 2009
    Posts
    36

    Default

    Quote Originally Posted by cPanelDavidG View Post
    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>
    Thanks David, it works fine with your example and after verifying my code there is something like <args> to remove from it.

Similar Threads & Tags
Similar threads

  1. XML-API function "setacls" documentation error
    By MSTF in forum cPanel Developers
    Replies: 3
    Last Post: 03-04-2011, 08:16 AM
  2. XML-API function "setacls" documentation error
    By MSTF in forum New User Questions
    Replies: 1
    Last Post: 03-02-2011, 07:49 AM
  3. PHP update, now include "uri" doesn't work
    By GoWilkes in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-05-2010, 03:30 PM
  4. Replies: 2
    Last Post: 01-27-2009, 04:39 PM
  5. Replies: 8
    Last Post: 02-22-2004, 01:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube