Description
This function generates a name for a new email filter. When you call this function, it counts the existing email filters and returns a suggested rule name. For example, if you call this function for user@example.com
, and user@example.com
owns three existing filters, the function returns Rule 4
.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
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 |
account |
string |
The cPanel account name or email address for which the function counts filters. If you do not use this parameter, the function counts user-level filters. |
|
user@example.com |
filtername |
string |
An alternate filter name, if the function cannot generate one. For example, the function returns this value in thefiltername return if the account address does not posses filters. |
A string value. |
Rule 9 |
Returns
Return |
Type |
Description |
Possible values |
Example |
filtername |
string |
The suggested rule name. |
|
Rule 9 |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |