Description

This function disables an email filter.

Examples




https://hostname.example.com:2083/cpsess##########/execute/Email/disable_filter?account=user%40example.com&filtername=coffee



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Disable user@example.com's coffee filter.
$filter_disable = $cpanel->uapi(
    'Email', 'disable_filter',
    array(
        'account'     => 'user@example.com',
        'filtername'  => 'coffee',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Disable user@example.com's coffee filter.
my $filter_disable = $cpliveapi->uapi(
    'Email', 'disable_filter',
    {
        'account'     => 'user@example.com',
        'filtername'  => 'coffee',
    }
);

 



<!-- Disable user@example.com's coffee filter. -->
[% execute('Email', 'disable_filter', { 'account' => 'user@example.com', 'filtername' => 'coffee', }) %]

 



uapi --user=username Email disable_filter account=user%40example.com filtername=coffee



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



Parameters

ParameterTypeDescriptionPossible valuesExample
accountstring

Required

The email address that owns the filter.

A valid email address on the cPanel account.

user@example.com
filternamestring

Required

The filter's name.

The name of an email filter.coffee

Returns

ReturnTypeDescriptionPossible valuesExample
filternamestringThe filter's name.The filtername input parameter's value.coffee
updatedBooleanWhether the function updated the filter.
  • 1 — Updated,
  • 0 — Did not update.
1