Help Regarding Email::Autoresponder API

toqeer2050

Registered
Jan 11, 2013
1
0
1
cPanel Access Level
Root Administrator
include("xmlapi.php");

//=======================================
$server = "127.0.0.1";
$auser = "cPanel username";
$pass = "The Password";
$port = '2083';
$domain = 'domain.tld';

//=======================================

$xmlapi = new xmlapi($server);
$xmlapi->set_port(2083);
$xmlapi->password_auth($auser,$pass);
$xmlapi->set_debug(1);


// Add new Email autoresponder
$add_a_email = $_POST['add_a_email'];
$add_a_from_name = $_POST['add_a_from_name'];
$add_a_subject = $_POST['add_a_subject'];
$add_a_content = $_POST['add_a_content'];
$add_a_start = $_POST['add_a_start'];
$add_a_stop = $_POST['add_a_stop'];
$args = array(
'email' => $add_a_email,
'from' => $add_a_from_name,
'subject' => $add_a_subject,
'body' => $add_a_content,
'domain' => $domain,
'html' => '0',
'interval' => '3600',
'start' => $add_a_start,
'stop' => $add_a_stop
);
$response = $xmlapi->api1_query($auser, "Email", "addautoresponder", $args);



I am using above code to make autoresponder plugin. I need help. when user enter values and press submit button will this script work there? or we need to write something more to make this thing working. I am saving this file as autored.php is that ok ? and where is xmlapi.php . should i put it in the same directory where my plugin file autored.php is placed? Please help to complete this plugin for me. I urgently need this.