Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    151
    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:
    151
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    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%3A%3AEmail%3A%3Aaddforward.pod.html
     
  4. JimmyD

    JimmyD Member

    Joined:
    Mar 11, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    151
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    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:
    151
    Thanks a lot for your reply, David!
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice