Problem when deleting forwarder

oldunis

Registered
Jun 11, 2004
1
0
151
Hello,

I've got a problem trying to delete a forwarder with PHP... I use the same script for adding forwarder and subdomain, which works. But when i try to do it to delete email forwarder, even if i make it show what it receieve (success in this case), the forwarder is still there and just won't be deleted...

I've updated to latest STABLE version... still doesn't work

Don't know what to do, hope you could help!
 
Last edited:

macooper

Member
May 3, 2004
14
0
151
Hi,
Can't really say why your version doesn't work, but I just tried the followinh PHP, and it works fine on 9.9.8-RELEASE 5. This is using the X theme.

PHP:
$request = "/frontend/x/mail/[email protected][email protected]";

$username = 'myusername';
$password = 'mypassword';
$host = 'www.example.com';

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_URL, "https://$host:2083" . $request);  

curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($ch);  
curl_close($ch);
echo $result;
HTH,
Martin