Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
要在不直接使用 cPanel 的情况下创建电子邮件帐户,您可以使用 cPanel & WHM 的 API。
看看下面的论坛帖子,它处理同样的事情。
使用 API 创建电子邮件帐户
注意:XML -PHP API 已移至 GitHub,可通过以下链接获取 https://github.com/CpanelInc/xmlapi-php您可以从 https://github.com/CpanelInc/ 下载 1.0.12 版本xmlapi-php/zipball/v1.0.12
在 zip 中,查看示例目录中的 api1_example.php,这就是您想要的。
api1_example.php
更新简而言之,您可以通过 PHP 脚本这样做
include("../xmlapi.php"); $ip = ip.of.your.server; $root_pass = 'password_of_your_root_account'; $account = "cpanel_username"; // Email account to create $email_user = "somerandomuser"; $email_password = "adfm90f1m3f0m0adf"; $email_domain = "somedomain.com"; $email_quota = '10'; // initialize api $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) );
For creating email accounts without using cPanel directly you can use cPanel & WHM's API.
Look at the following forum post, it deals with same thing.
Create Email Account using API
Note: the XML-PHP API has moved to GitHub and is available at following link https://github.com/CpanelInc/xmlapi-phpYou can download the 1.0.12 release from https://github.com/CpanelInc/xmlapi-php/zipball/v1.0.12
In the zip look at api1_example.php in Examples directory it is what you want.
UpdateIn short you can do it like this from a PHP script
如果您的 cPanel 上有 Fantastico 或 Softaculous(或其他一些脚本安装向导)(在“软件/服务”下查找),那么您也许可以安装邮件列表应用程序并使用它。
If you have Fantastico or Softaculous (or some other script installation wizard) on your cPanel (look for it under Software/Services) then you may be able to install a mailing list application and use that.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
要在不直接使用 cPanel 的情况下创建电子邮件帐户,您可以使用 cPanel & WHM 的 API。
看看下面的论坛帖子,它处理同样的事情。
使用 API 创建电子邮件帐户
注意:XML -PHP API 已移至 GitHub,可通过以下链接获取 https://github.com/CpanelInc/xmlapi-php
您可以从 https://github.com/CpanelInc/ 下载 1.0.12 版本xmlapi-php/zipball/v1.0.12
在 zip 中,查看示例目录中的
api1_example.php
,这就是您想要的。更新
简而言之,您可以通过 PHP 脚本这样做
For creating email accounts without using cPanel directly you can use cPanel & WHM's API.
Look at the following forum post, it deals with same thing.
Create Email Account using API
Note: the XML-PHP API has moved to GitHub and is available at following link https://github.com/CpanelInc/xmlapi-php
You can download the 1.0.12 release from https://github.com/CpanelInc/xmlapi-php/zipball/v1.0.12
In the zip look at
api1_example.php
in Examples directory it is what you want.Update
In short you can do it like this from a PHP script
如果您的 cPanel 上有 Fantastico 或 Softaculous(或其他一些脚本安装向导)(在“软件/服务”下查找),那么您也许可以安装邮件列表应用程序并使用它。
If you have Fantastico or Softaculous (or some other script installation wizard) on your cPanel (look for it under Software/Services) then you may be able to install a mailing list application and use that.