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 accounts creation with API/Scripts

Discussion in 'cPanel Developers' started by JimmyD, Aug 16, 2007.

  1. JimmyD

    JimmyD Member

    Joined:
    Mar 11, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I'm wondering if anybody knows how I can automatically create the email accounts for accounts in WHM.

    Just to make my intends clear, I have a huge list of emails which is not possible to setup by hands, but I need to setup them somehow for my cPanel accounts.

    I was planning to use API/Scripts, but I don't see any suitable function in API documentation and don't see any email-related script here http://www.cpanel.net/docs/whm/Scripts.htm

    Please advise :)

    Any advices are greatly appreciated!
     
  2. Empyrium

    Empyrium Member

    Joined:
    May 23, 2007
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
  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
    The XML API is far more powerful and now that you're using cPanel 11 you can use it. The website is:

    http://www.cPanel.net/plugins/devel

    The XML API can also be used in conjunction with API2. The API2 documentation is not yet complete, but here's a list of the email functions available via API2:

    Cpanel::Email::accountname
    Cpanel::Email::addforward
    Cpanel::Email::checkmaindiscard
    Cpanel::Email::deletefilter
    Cpanel::Email::fetchautoresponder
    Cpanel::Email::fetchcharmaps
    Cpanel::Email::filterlist
    Cpanel::Email::filtername
    Cpanel::Email::getdiskusage
    Cpanel::Email::listaliasbackups
    Cpanel::Email::listautoresponders
    Cpanel::Email::listdefaultaddresses
    Cpanel::Email::listdomainforwards
    Cpanel::Email::listfilterbackups
    Cpanel::Email::listfilters
    Cpanel::Email::listforwards
    Cpanel::Email::listlists
    Cpanel::Email::listmaildomains
    Cpanel::Email::listmxs
    Cpanel::Email::listpopssingle
    Cpanel::Email::listpopswithdisk
    Cpanel::Email::loadfilter
    Cpanel::Email::setdefaultaddress
    Cpanel::Email::storefilter
    Cpanel::Email::tracefilter

    Unfortunately, I don't see anything that indicates it would create an email account - only creating a redirect. You can find API2 documentation for that function at:

    http://www.cpanel.net/plugins/api2/Cpanel::Email::addforward.pod.html
     
  4. JimmyD

    JimmyD Member

    Joined:
    Mar 11, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
  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
    If you happen to know the IP address of the server, you could always do: http://IP:2082 or https://IP:2083 to login to the cPanel interface.
     
  6. JimmyD

    JimmyD Member

    Joined:
    Mar 11, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks a lot for your reply, David!
     
Loading...

Share This Page