public static stringautoresponderDetailCreate(string token,string autoresponderID,array AutoresponderDetail)
Create an Autoresponder campaign
Email Campaign Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
string autoresponderIDThe autoresponderID ID . To get all the Autoresponder campaigns, use the autoresponderGetList method.
array AutoresponderDetailThe array containing the Autoresponder email details.
string subjectThe subject line of the email
string templateContent The HTML content of the email
string templateText The Text version of the email
string us_address The Address line in case of a US based sender.
string us_state The State in case of a US based sender.
string us_city The City in case of a US based sender.
string us_zip The Zip Code in case of a US based sender. Defaults to address information provided in the Client Settings.
string intl_address The Address line in case of Outside US-based sender.
string type Type of the autoresponder - valid values are 'one off email' , 'annual email' , 'new subscriber email'.
string days No of days after the date of the creation of the Autoresponder when the email is to be sent to the list.
string whentosendWhen to send the autoresponder valid values are 'after' , 'before', ignore if this is not applicable.
string fieldtocompareLabel of the datecolumn which is used as a reference for 'annual email' or 'one off email' , ignore if this is not applicable.

stringReturns the ID of the newly created Autoresponder email template.

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  11. /**
  12. Fetch the latest Autoresponder, so that we can retrieve the Autoresponder ID.
  13. **/
  14. $AutoresponderList = $client->autoresponderGetList($token,1,10,'','','');
  15. $autoresponderID = $AutoresponderList[0]['id'];
  17. $AutoresponderDetail = array();
  18. $AutoresponderDetail['subject'] = 'My Autoresponder day 1'
  19. $AutoresponderDetail['templateContent'] = ' Hello World '
  20. $AutoresponderDetail['templateText'] = 'text version'
  21. $AutoresponderDetail['us_address'] = 'Bellhop street, amydale avenue'
  22. $AutoresponderDetail['us_state'] = 'California'
  23. $AutoresponderDetail['us_city'] = 'San hose'
  24. $AutoresponderDetail['us_zip'] = '7000043'
  25. $AutoresponderDetail['intl_address'] = ''
  26. $AutoresponderDetail['type'] = 'annual email'
  27. $AutoresponderDetail['days'] = '0'
  28. $AutoresponderDetail['whentosend'] = 'before'
  29. $AutoresponderDetail['fieldtocompare'] = 'bday'
  31. $data = $client->autoresponderDetailCreate($token,$autoresponderID, $AutoresponderDetail);
  32. print($data);
  33. ?>