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.

Delete forwarder using api

Discussion in 'General Discussion' started by lazzymonk, Feb 1, 2008.

  1. lazzymonk

    lazzymonk Member

    Joined:
    Feb 1, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Anyone know of the api1 or api2 command to delete an email forwarder in cpanel. i can do everything else i need to do with the api i just cant remove forwarders once they are set.

    ps why is there so little documentation on the api? i cant seem to find any at all on api1 commands.
     
  2. lazzymonk

    lazzymonk Member

    Joined:
    Feb 1, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Anyone? maybe im asking in the wrong place? if a mod reads this can they put this post in the right place.
     
  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
    When you are deleting a forward in the cPanel interface with the X3 theme, you are executing .../frontend/x3/mail/dodelfwd.html?email=...

    Looking in /usr/local/cpanel/base/frontend/x3/mail/dodelfwd.html yields the API 1 function:

    HTML:
    <cpanel Email="delforward($FORM{'email'})">
    Where $FORM{'email'} is the email address.

    Just so you know, improved API documentation is definitely on our to-do lists :).
     
  4. lazzymonk

    lazzymonk Member

    Joined:
    Feb 1, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thats great thanx.

    now another thing on the same subject.

    im using urls to interact with the xml api.

    http://domain.com:2082/xml-api/cpanel?user=someone&xmlin=<cpanelaction><module>Email</module><func>delforward</func><apiversion>1</apiversion><args>someone@domain.com=some_else@domain.com</args></cpanelaction>

    that command works, but it does not return anything.

    all i get is

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

    which is the same if it works or not. am i missing an arg to get an output or am i using it in a way it was never intended so lucky to get it working at all?

    ps look forward to the better documentation
     
  5. 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
  6. lazzymonk

    lazzymonk Member

    Joined:
    Feb 1, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    if i send it someone@domain.com
    it doesnt delete the forwarder and doesnt give a different response either.

    someone@domain.com=some_else@domain.com

    is the only way i can get it to delete the forwarder.

    im confused. i think i might just have to put up with no real response and find anothre way to verify the forwarder was deleted.

    thanx for your help
     
    #6 lazzymonk, Feb 4, 2008
    Last edited: Feb 4, 2008
  7. neo4242002

    neo4242002 Well-Known Member

    Joined:
    Jun 28, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Hi lazzymonk, If you were able to resolve this issue., I would like to know. :)
     
Loading...

Share This Page