cPanel Remote Email Account Management

Hello,

What are my options for creating and deleting email accounts on cPanel using the remote API, or server internal hooks, etc.?

I need PHP code examples, and guidance on installing the required API's on a LAMP server.

I have root access to the server.

Thank you.

onegrisAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jayachandran PalanisamyTechnical Consultant - LinuxCommented:
Hi,
I hope this might help you.
<cpanel Email="addpop($FORM{'email'},$FORM{'password'},$FORM{'quota'},$FORM{'domain'})">

Open in new window

The first parameter is the portion of the email address before the @ sign (e.g. nobody, if creating nobody@example.com)
The second parameter is the password for the mail account
The third parameter is the disk quota in megabytes (e.g. 250)
The forth parameter is the domain this email address is for (e.g. example.com if creating nobody@example.com).

For editing an email account's password, you would use:
<cpanel Email="passwdpop(email, password, quota, domain)">

Open in new window

email is the portion of the email address before @
password is the new password for the email account.
quota is the email quota
domain is the portion of the email address after @

For more information please refer this URLs.
http://forums.cpanel.net/f42/create-email-account-using-api-121741.html
http://forums.cpanel.net/f42/xmlapi-php-class-111897.html

-Jay
0
onegrisAuthor Commented:
@chandranjoy,

Thank you for the reply.

What you describe may work for my purposes, but I need a full tutorial that assumes I know nothing about the cPanel API's.  This is my first time using cPanel, let alone the cPanel API's.

I've looked all over the cPanel website, but all of their documents are intended for people who already know how their API's work.

The cPanel forum also doesn't provide a basic primer on working with the cPanel API's.

Any other references you can provide, that show how to get these API's working, and that assume zero knowledge of the API's on the part of the reader, would be greatly appreciated.

Or perhaps you can explain how to work with these API's, from the very basic level.

For example, what you describe above appears to be a custom html tag ... <cpanel> ... which suggests that the commands you describe are embedded in an html document.

Beyond that, I am clueless as to how your code above would work in a real application.

Thank you.
0
onegrisAuthor Commented:
Upon further reading of the cPanel online SDK documents, I finally got the cPanel API-1 working, through the WHM SSL interface.

The expert replies and their references pertained to the <cpanel> tag interface, which was not used in my solution.  Therefore I am withholding the points, and closing the question henceforth.

Thank you for the replies all the same.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
onegrisAuthor Commented:
Upon further reading of the cPanel online SDK documents, I finally got the cPanel API-1 working, through the WHM SSL interface.

The expert replies and their references pertained to the <cpanel> tag interface, which was not used in my solution.  Therefore I am withholding the points, and closing the question henceforth.

Thank you for the replies all the same.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.