PDA

View Full Version : Project - need to add email accts outside of DA CP



hostpc.com
12-04-2003, 07:31 AM
I've just been handed this "project" (ie "list of demands") and since you guys are so creative with the API and DA backend, thought I'd ask here. I am by no means a php "guru", tho I could learn a lot by example. I'm not asking anyone to "do it for me" - but a guide in the right direction, or if there's a pre-existing similar script that I could learn by/modify, that'd be great.

Goal: Create a web page (accessible outside the control panel) that will accept a new username, generate a random password, setup the (POP3) account on that particular domain (for instance, a form at http://mydomain.com/form.php generates the email at mydomain.com), and then have the results (u/p/settings) mailed to 2 or more people.

Any ideas? Thoughts? Suggestions?

hostpc.com
12-04-2003, 07:43 AM
I tried something along these lines:


http://www.server.com:2222/CMD_API_POPD&action=create&domain=domain99.com&user=joe&passwd=password&quota=10

Returned:

You cannot execute that command



Details
The request you've made cannot be executed because it does not exist in your authority level

l0rdphi1
12-04-2003, 08:17 AM
To work with the DA APIs you will need to make use the communication class (http://www.directadmin.com/forum/showthread.php?threadid=258). Once you are familiar with the class working with DA's APIs is very easy :)

However, on this specific application - at some point one of us in this community is going to put together a script for adding/editing/removing email accounts, but at this time I know I am at least a little busy for the task. *Possibly* this weekend I could put something basic together for the general public, but I can't promise anything :)

Good luck.

ProWebUK
12-04-2003, 09:57 AM
The man with the plan! (http://www.directadmin.com/forum/showthread.php?s=&threadid=1099)

Take a look at that thread ;)

Chris

DirectAdmin Support
12-04-2003, 10:45 AM
I've just added the Email API's (among a few other things) to the api.html file:

http://www.directadmin.com/api.html#email

John