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.

Auto create new email account

Discussion in 'E-mail Discussions' started by cyndre2, Sep 19, 2008.

  1. cyndre2

    cyndre2 Member

    Joined:
    Jul 15, 2008
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I have been searching the forums, reading the api, excetera for a few days now. I have the creation of a domain account working - but cant figure out how to create an email via an api call. This is what Im using - and I have tried the $emailUser where it says user=nick as well. If someone could tell me what I am doing wrong I would greatly appreciate it.

    /xml-api/cpanel?user=nick&xmlin=<cpanelaction><module>Email</module><func>addpop</func><apiversion>1</apiversion><args>$emailUser</args><args>$emailPass</args><args>$emailDomain</args></cpanelaction>

    If I go to http://server.net/xml-api/cpanel?user=nick&xmlin=<cpanelaction><module>Email</module><func>addpop</func><apiversion>1</apiversion><args>$emailUser</args><args>$emailPass</args><args>$emailDomain</args></cpanelaction>

    I get this page cant be displayed.

    Thanks in advance.
     
  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
    A couple of things to consider:

    It should be http://example.net:2086/xml-api... or https://example.net:2087/xml-api..., not http://example.net/xml-api :)

    With the user=nick example, nick is a cPanel user - not an email user.
     
  3. cyndre2

    cyndre2 Member

    Joined:
    Jul 15, 2008
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Awsome - thank you very much. Its now working like a charm.
     
Loading...

Share This Page