Description

This function deletes an email filter.

Examples




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



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

 



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

 



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

 



uapi --user=username Email delete_filter account=user@example.com filtername=coffee



{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": null,
  "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

This function only returns metadata.