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.

Email management

Discussion in 'cPanel Developers' started by teamred, Oct 12, 2009.

  1. teamred

    teamred Member

    Joined:
    Sep 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I am using XMLAPI php class for my project and it worked perfect until I came to Email management part.

    First, I don't see documentation for email functions for API1:
    API Reference

    There are documentation for API2 functions, but most of those functions are for listing, not for creation.

    So, can somebody point me where I can find additional information. Also one example for adding emails to existing cpanel user, using XMLAPI php class would be apricated.

    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
    Unfortunately at this point the email API interface is not completely documented which is something we hope to have documented soon.

    however, if let me know what specifically you are wanting to do.. I can give you the interfaces for them. (or give you a utility for working with them)
     
  3. teamred

    teamred Member

    Joined:
    Sep 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for reply.

    I figure out how to add new email to an account :)

    Can you provide me list of arguments for function for deleting an email(delpop function).
     
  4. teamred

    teamred Member

    Joined:
    Sep 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Can somebody help me to find out what is wrong in xml for deleting forwarding email:

    <cpanelaction>
    <module>Email</module>
    <func>delforward</func>
    <apiversion>1</apiversion>
    <args>test@example.com</args>
    </cpanelaction>

    What I found in source code(dodelfwd.html), is that delforward require only one parameter, and that is email that should be deleted. I tried to remove everything after @ in email, but still don't get any reply.

    I couldn't find anything in this forum, or in existing documentation, so please help!
     
  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
    The final parameter is email@yourdomain.test=destination@address.test. Keep in mind, a single email address can have several forwarders, thus forward to several destinations. This syntax accommodates the need to remove only 1 of the forwarders rather than being forced to remove all forwarders for a specific address.
     
  6. teamred

    teamred Member

    Joined:
    Sep 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for help. It is working finally.
     
Loading...

Share This Page