Description

This function modifies the filter order for an email address.

  For more information about Exim filters, read Exim's documentation.

Examples




https://hostname.example.com:2083/cpsess##########/execute/Email/reorder_filters?mailbox=user%40example.com&filter0=coffee&filter1=cheesecloth&filter2=oil



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Reorder the filters for user@example.com.
$filter_order = $cpanel->uapi(
    'Email', 'reorder_filters',
    array(
        'mailbox'     => 'user@example.com',
        'filter0'     => 'coffee',
        'filter1'     => 'cheesecloth',
        'filter2'     => 'oil',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Reorder the filters for user@example.com.
my $filter_order = $cpliveapi->uapi(
    'Email', 'reorder_filters',
    {
        'mailbox'     => 'user@example.com',
        'filter0'     => 'coffee',
        'filter1'     => 'cheesecloth',
        'filter2'     => 'oil',
    }
);

 



<!-- Reorder the filters for user@example.com. -->
[% execute( 'Email', 'reorder_filters', { 'mailbox' => 'user@example.com', 'filter0' => 'coffee', 'filter1' => 'cheesecloth', 'filter2' => 'oil', } ) %]

 



uapi --user=username Email reorder_filters mailbox=user%40example.com filter0=coffee filter1=cheesecloth filter2=oil



{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": null,
  "metadata": {
    "transformed": 1
  }
}



Parameters

ParameterTypeDescriptionPossible valuesExample
mailboxstring

Required

The email address.

A valid email address on the cPanel account.

user@example.com
filter*string

Required

A mail filter name.

The name of one of the email address's filters.

For each mail filter to reorder, supply a filter* parameter, where * is a number that represents the filter's order.

For example, to set coffee as the first email filter and cheesecloth as the second, set coffee as the filter1 parameter's value, and cheesecloth as the value for the filter2 parameter.

coffee

Returns

This function only returns metadata.