
Originally Posted by
nick1
Hello,
Does anyone know how to create an email for a domain via console without logging to the cPanel account of that domain.
Any help would be appreciated.
Thank you,
One solution is to build a shell script that can do this for you, where that shell script makes use of our XML API to call the API1/API2 function that creates email accounts.
Here's a link to the documentation on how to call API1 and API2 functions via the XML API:
http://www.cpanel.net/plugins/xmlapi/cpanel.html
Here is the API1 function call as used in the X3 theme (/usr/local/cpanel/base/frontend/x3/mail/doaddpopinclude.html):
Code:
<cpanel Email="addpop($FORM{'email'},$FORM{'password'},$FORM{'quota'},$FORM{'domain'})">