Description

This function deletes an email forwarder.

Examples




https://hostname.example.com:2083/cpsess##########/execute/Email/delete_forwarder?address=user%40example.com&forwarder=fwdtome%40example.com



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Delete the forwarder for user@example.com
$delete_forwarder = $cpanel->uapi(
    'Email', 'delete_forwarder',
    array(
        'address'        => 'user@example.com',
        'forwarder'      => 'fwdtome@example.com',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Delete the forwarder for user@example.com
my $delete_forwarder = $cpliveapi->uapi(
    'Email', 'delete_forwarder',
    {
        'address'        => 'user@example.com',
        'forwarder'      => 'fwdtome@example.com',
    }
);

 



<!-- Delete the forwarder for user@example.com -->
[% execute( 'Email', 'delete_forwarder', { address => 'user@example.com', forwarder => 'fwdtome@example.com' } ) %]

 



uapi --user=username Email delete_forwarder address=user%40example.com forwarder=fwdtome%40example.com



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



Parameters

ParameterTypeDescriptionPossible valuesExample
addressstring

Required

The forwarder's email address.

A valid email address on the cPanel account.

user@example.com
forwarderstring

Required

The forwarder's destination.

  • A valid email address.
  • A script location.
  • A system account.
fwdtome@example.com

Returns

This function only returns metadata.