# Create email account forwarder

This function creates an email forwarder.

Important:

  When you disable the MailReceive role, the system disables this function. 
  For more information, read our How to Use Server Profiles 
  documentation.

Endpoint: GET /Email/add_forwarder
Version: 11.136.0.14
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    The domain.
    Example: "example.com"

  - `email` (string, required)
    The email address to forward.
    Example: "forwardme@example.com"

  - `fwdopt` (string, required)
    The method to use to handle the email address's mail.
    Example: "fwd"

  - `failmsgs` (string)
    The failure message for the message's sender.

Note:

 Use this parameter if you used the fail method for the fwdopt parameter.
    Example: "Nobody home."

  - `fwdemail` (string)
    The email address to which the system forwards messages.

Note:

 You must use this parameter if you used the fwd method for the fwdopt parameter. You can pass multiple addresses to this parameter as a comma-separated list.
    Example: "fwdtome@example.com"

  - `fwdsystem` (string)
    The system user to whom the system forwards messages.

Note:

 You must use this parameter if you used the system method for the fwdopt parameter.
    Example: "user"

  - `pipefwd` (string)
    The application to which the system pipes messages.

Note:

 You must use this parameter if you used the pipe method for the fwdopt parameter.

Important:

  This parameter requires the FileStorage role. For more information, read our 
  How to Use Server Profiles documentation.
    Example: "mailscript.pl"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "add_forwarder"

  - `module` (string)
    The name of the module called.
    Example: "Email"

  - `result` (object)

  - `result.data` (array)

  - `result.data.domain` (string)
    The domain. A valid domain on the account.
    Example: "example.com"

  - `result.data.email` (string)
    The email address. An email address on the account.
    Example: "user@example.com"

  - `result.data.forward` (string)
    The method that the system will use to handle the address's mail.
- An email address  The system forwards mail to this address.
- :fail:  The system bounces mail back to the sender and sends a failure message.
- :blackhole:  The system deletes mail without a failure message.
- The path to an application  The system pipes mail to this application.
- A username  The system forwards mail to this system account.
    Example: "fwdtome@example.com"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    - 1 - Success
- 0 - Failed: Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


