Description

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


  • 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.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/set_user_email_forward_destination?api.version=1&user=root&forward_to=user




https://hostname.example.com:2087/cpsess##########/xml-api/set_user_email_forward_destination?api.version=1&user=root&forward_to=user




whmapi1 set_user_email_forward_destination user=root forward_to=user



{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "set_user_email_forward_destination"
  }
}




<result>
   <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>set_user_email_forward_destination</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The system account name to forward.

A valid system account.

root
forward_tostring

Required

The system account name or email address to which you wish to forward email.

  • A valid system account.
  • A valid email address.

To forward messages to multiple accounts or email addresses, enter them in a comma-separated list.


user

Returns

This function only returns metadata.