Hi,
I am using this code posted by baldarab, Mar 19, 2014 to create a forwarding account. It works great.
But now I am trying to use the same code to delete a forwarding account, but can't find the correct syntax on the forums.
Tried: delforward, dodelfwd (in place of addforward) but neither works.
$result_forward = $xmlapi->api2_query($account, 'Email', 'addforward', array($email_domain, $email_user, 'fwd', $dest_email) );
?>
Any ideas?
I am using this code posted by baldarab, Mar 19, 2014 to create a forwarding account. It works great.
But now I am trying to use the same code to delete a forwarding account, but can't find the correct syntax on the forums.
Tried: delforward, dodelfwd (in place of addforward) but neither works.
$result_forward = $xmlapi->api2_query($account, 'Email', 'addforward', array($email_domain, $email_user, 'fwd', $dest_email) );
?>
Any ideas?
<?php
include 'xmlapi.php' ;
$ip = 'nnn.nnn.nnn.nnn';
$root_pass = 'pppppppp';
$account = 'aaaaaa';
$email_user = $_POST['Username'];
$email_password = $_POST['EmailPassword'];
$dest_email = $_POST['ParentEmail'];
$email_domain = 'domain.com';
$email_quota = '10';
$xmlapi = new xmlapi($ip);
$xmlapi->set_port(2083);
$xmlapi->password_auth($account,$root_pass);
$xmlapi->set_output('xml');
$result = $xmlapi->api1_query($account, 'Email', 'addpop', array($email_user, $email_password, $email_quota, $email_domain) );
$result_forward = $xmlapi->api2_query($account, 'Email', 'addforward', array($email_domain, $email_user, 'fwd', $dest_email) );
?>
include 'xmlapi.php' ;
$ip = 'nnn.nnn.nnn.nnn';
$root_pass = 'pppppppp';
$account = 'aaaaaa';
$email_user = $_POST['Username'];
$email_password = $_POST['EmailPassword'];
$dest_email = $_POST['ParentEmail'];
$email_domain = 'domain.com';
$email_quota = '10';
$xmlapi = new xmlapi($ip);
$xmlapi->set_port(2083);
$xmlapi->password_auth($account,$root_pass);
$xmlapi->set_output('xml');
$result = $xmlapi->api1_query($account, 'Email', 'addpop', array($email_user, $email_password, $email_quota, $email_domain) );
$result_forward = $xmlapi->api2_query($account, 'Email', 'addforward', array($email_domain, $email_user, 'fwd', $dest_email) );
?>