how to delete forwarders by api

remedia

New member
Joined
Nov 11, 2004
Messages
3
hi,.

how can i delete forwarders?
found nothing on this board or in the docs,..
please help,.

$Socket = new HTTPSocket;
$Socket->connect($daserver,'2222');
$Socket->set_login($dalogin,$dapass);
$Socket->set_method('POST');
$Socket->query('/CMD_EMAIL_FORWARDER',
array(
'Name' => '[email protected]',
'domain' => 'mydomain.com',
'action' => 'delete'
));

Ronald
 
I don't know if it can be done through the API, you might have to directly manipulate the necassary files or ask DirectAdmin to add this API function, however a venue which I have not explored is not using DirectAdmin's API which returns nice output but to go directly through DirectAdmin itself.
 
found it,.
this is the sollution;

$Socket = new HTTPSocket;
$Socket->connect($daserver,'2222');
$Socket->set_login($dalogin,$dapass);
$Socket->set_method('POST');
$Socket->query('/CMD_EMAIL_FORWARDER',
array(
'user' => $name,
'domain' => $domain,
'action' => 'delete',
'select0' => $name
));

Ronald
 
Last edited:
Back
Top