Return cPanel account forward destination

This function retrieves the destination to which the system forwards a system account's email.

Note:

  • Usually, the system sends notices about the server's problems and activity to the root account.
  • If you do not use the suexec module, the nobody user receives bounce messages from email that CGI scripts send.

Important:

When you disable the Receive Mail role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
user
required
string

The system account name.

Example: user=root
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/get_user_email_forward_destination
Request samples
whmapi1 --output=jsonpretty \
  get_user_email_forward_destination \
  user='root'
Response samples
application/json
{
  • "data": {
    • "forward_to": [
      • "user@example.com"
      ]
    },
  • "metadata": {
    • "command": "get_user_email_forward_destination",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}