Email
Email Accounts
Create email account
This function creates an email address.
Important:
- When you disable the Receive Mail role, the system disables this function.
- We recommend that you use the UAPI UserManager::create_user function to create an email address instead of this function. This function is incompatible with the Reset Password feature.
- You must URI-encode values when using the CLI.
get/Email/add_pop
Query parameters
The email account username or address.
- A valid email account username. For example, user to create user@example.com.
- A valid email address.
Note:
You cannot enter cpanel as an account name when you create an email account.
passwordstring required
Example:123456luggage
The email account password.
domainstring domain
Example:example.com
The email account's domain. For example, example.com to create user@example.com.
password_hashstring
Example:$6$1sOyHP5ZDYp3pGUz$R0TSgfPRHfDjT5PP5RJGv39FhiGTNNPvM7IFpCBjXijMmlMZk9yI8T3LqGuntc9fdKb5eX.lGL7wBS9e4DAWn/
The account's password hash.
Notes:
- You can use this parameter instead of the password parameter. However, you cannot use both password and password_hash parameters in the same request.
- You can find your server's hash type in the /etc/sysconfig/authconfig file.
The maximum amount of disk space that the new email account may use.
- A positive integer that represents the maximum amount of disk space, in megabytes (MB).
- 0 or unlimited — The account possesses unlimited disk space.
Note:
- The positive integer value cannot exceed the maximum email quota.
- The 0 or unlimited value is only available to users without a maximum email account quota.
send_welcome_email0 | 1
Whether to send client configuration instructions to the account.
- 1 — Send the instructions.
- 0 — Do not send the instructions.
skip_update_db0 | 1
Example:1
Whether to skip the update of the email accounts database's cache.
- 1 — Skip the update.
- 0 — Perform the update.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "add_pop",
"module": "Email",
"result": {
"data": "user+example.com",
"status": 1
}
}