I have created a hosted CMS with PHP on a LAMP VPS. I want to provide email services for my clients, but cannot give them cPanel access. So right now I have to create their email accounts, although they can afterwards manage them with webmail via Horde or Roundcube.
I’m looking for a mail web application built with PHP that will allow my clients to completely manage their mail themselves. Or maybe there is a PHP class available which I can build upon.
Any reason why you can’t still give them Cpanel access but limit what they have access to?
There are two reasons I can’t give the clients cPanel access.
This is a hosted CMS. All the websites (and domains) are within a single cPanel account.
I don’t want my clients to see or have access to any features in cPanel. The only access they have is through the CMS.
oddz
March 8, 2015, 10:27pm
5
I was curious so I conducted a search for a cpanel api and found this.
<?php
/**
* cPanel XMLAPI Client Class
*
* This class allows for easy interaction with cPanel's XML-API allow functions within the XML-API to be called
* by calling funcions within this class
*
* LICENSE:
*
* Copyright (c) 2012, cPanel, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other materials provided with the distribution.
* * Neither the name of the cPanel, Inc. nor the names of its contributors may be used to endorse or promote
This file has been truncated. show original
Which lead me to this.
https://documentation.cpanel.net/display/SDK/Software+Development+Kit+Home
So in theory you could use the above github class or build your own to programmatically authenticate and add email accounts.
Here is the cpanel api2 method to add an email account.
https://documentation.cpanel.net/display/SDK/cPanel+API+2+Functions+-+Email%3A%3Aaddpop
Digging more into it here is the official cpanel php sdk.
https://github.com/CpanelInc/publicapi-php
Funny that the OFFICIAL api was no were to be found in google when I searched “cpanel api”.
Thank you both.
The cPanel API possibility is intriguing.
system
Closed
June 8, 2015, 10:21am
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.