Hi.
I have a script I am using to create an email account and forwarder using a POST from an campaign. It is succeeding in creating the email account, but does not create the forwarder. I'd appreciate any help on why that might be. I've scoured the forums, and can't see that the script is non-compliant. Anyway, here it is:
I have a script I am using to create an email account and forwarder using a POST from an campaign. It is succeeding in creating the email account, but does not create the forwarder. I'd appreciate any help on why that might be. I've scoured the forums, and can't see that the script is non-compliant. Anyway, here it is:
PHP:
<?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) );
?>