October 28, 201016 yr I am looking at setting up a webmail script for a few friends to use. Is there a script or a way for the email account to be setup automatically when they choose a user name. Hope I have been clear enough Thanks Nick
October 29, 201016 yr There are no out of the box solutions for this, so you need to write it yourself. Download the cPanel/WHM PHP SDK from - http://sdk.cpanel.net/lib/cp_xmlapi_php.tar.gz There is an example of how to do this in that archive file, however there is a typo in the code, the correct code is... include("xmlapi.php"); $ip = "127.0.0.1"; $root_pass = "testing"; $account = "cptest"; $email_user = "somerandomuser"; $email_password = "adfm90f1m3f0m0adf"; $email_domain = "somedomain.com"; $email_quota = '10'; $xmlapi = new xmlapi($ip); $xmlapi->password_auth("root", $root_pass); $xmlapi->set_output('json'); $xmlapi->set_debug(1); print $xmlapi->api1_query($account, "Email", "addpop", array($email_user, $email_password, $email_quota, $email_domain));
Create an account or sign in to comment