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.

Create email accounts via Joomla

Discussion in 'cPanel Developers' started by randelld, Jun 9, 2010.

  1. randelld

    randelld Registered

    Joined:
    Jun 9, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,
    I am trying to find a solution that I can implement that will automatically create email account on a given domain when a user registers on a joomla site on said domain.

    Is there anything around that could do this?

    Thanks for any help.
     
  2. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
  3. devendradb

    devendradb Member

    Joined:
    May 8, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mumbai, India
    email account

    Hi,
    create form for registration of email and on submit use folowing code

    PHP:
    $path="http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?&quota=$quota&email=$email&domain=$cpdomain&password=$pass";
    $f fopen($path,"r");
     
  4. devendradb

    devendradb Member

    Joined:
    May 8, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mumbai, India
    hi,
    create form for registration of email on submit button use following code

    PHP:
    $path="http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?&quota=$quota&email=$email&domain=$cpdomain&password=$pass";
    $f fopen($path,"r");
     
  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
    Here's a few problems with that code offhand:

    1. It broadcasts passwords in plain text for anyone to read (if executed remotely)
    2. It will not work on systems where XSRF protection is enabled
    3. It will not work on systems where url_fopen is disabled
    4. It is not well future-proofed

    I strongly recommend using the APIs instead. I'm moving this thread to the Developer Discussions forum so assistance with the APIs can be more readily provided.
     
  6. bwor

    bwor Member

    Joined:
    Jun 15, 2008
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I try to use that code but it dosent work with cpanel 11.25.
     
  7. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I concur with DavidG. All his points are complete valid and applicable.

    You should use the xml-api to perform such actions. It wouldn't be difficult to integrate the xml-api PHP client class, http://sdk.cpanel.net/lib/xmlapi/php/cp_xmlapi_php_v1.0.5.tar.gz, into the Joomla framework. You could make a registration Joomla Plugin which instantiates an xmlapi object and performs the necessary http call to your cpanel server.

    -DavidN
     
Loading...

Share This Page