Description
This function creates an email forwarder.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
Required The domain. |
A valid domain on the account. |
example.com |
|
string |
Required The email address to forward. |
An email address on the account. Note: You can pass multiple addresses to this parameter as a comma-separated list. |
forwardme@example.com |
fwdopt |
string |
Required The method to use to handle the email address's mail. |
|
fwd |
fwdemail |
string |
The email address to which the system forwards messages. Note: Use this parameter if you used the fwd method for thefwdopt parameter. |
A valid email address. |
fwdtome@example.com |
fwdsystem |
string |
The system user to whom the system forwards messages. Note: Use this parameter if you used the system method for the fwdopt parameter. |
An account on the system (for example, the reseller's account name or the cPanel account name). |
user |
failmsgs |
string |
The failure message for the message's sender. This parameter defaults to No such person at this address. Note: Use this parameter if you used the fail method for the fwdopt parameter. |
A valid string. |
Nobody home. |
pipefwd |
string |
The application to which the system pipes messages. Note: Use this parameter if you used the pipe method for the fwdopt parameter. |
The location of a program or script, relative to the account's home directory. |
mailscript.pl |
Returns
Return |
Type |
Description |
Possible values |
Example |
domain |
string |
The domain. |
A valid domain on the account. |
example.com |
|
string |
The email address. |
An email address on the account. |
user@example.com |
forward |
string |
The method that the system will use to handle the address's mail. |
|
fwdtome@example.com |