Child pages
  • WHM API 1 Functions - get_user_email_forward_destination

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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


Note
titleNotes:
  • 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.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledReceiveMailRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/get_user_email_forward_destination?api.version=1&user=root



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/get_user_email_forward_destination?api.version=1&user=root



Expand
titleCommand Line


Code Block
languagebash
whmapi1 get_user_email_forward_destination user=root 

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "data": {
    "forward_to": [
      "user@example.com",
      "user2"
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "get_user_email_forward_destination"
  }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <forward_to>user@example.com</forward_to>
        <forward_to>user2</forward_to>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_user_email_forward_destination</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The system account name.

A valid system account.

root

Returns

ReturnTypeDescriptionPossible valuesExample
forward_toarrayThe system accounts or email addresses to which the system forwards the account's email.
  • A valid system account.
  • A valid email address.
user@example.com