Back to Documentation Overview

campaignSendNow

public static campaignSendNow(string uid, string cid)

Send a given campaign immediately

Section:
Campaign Related
Parameters:
uid the id for your user account. Get by calling login($user, $pass)
cid the id for the campaign to send
Returns:
boolean   -  true on success

Examples (1)

download example code

[1] xml-rpc_campaignSend.php

  1. <?php
  2. /**
  3. This Example shows how to immediately Send a prepared Campaign using the XML-RPC service
  4. and do some basic error checking.
  5. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  6. **/
  7. require_once 'XML/RPC2/Client.php';
  8. include('inc/config.inc.php'); //contains username & password
  9.  
  10. $client = XML_RPC2_Client::create($apiUrl);
  11. $uuid = $client->login($username,$password);
  12.  
  13. try {
  14. $result = $client->campaignSendNow($uuid, $campaignId);
  15. echo "SUCCESS! \n";
  16. var_dump($result);
  17. } catch (XML_RPC2_FaultException $e){
  18. echo "ERROR!!!!\n";
  19. echo $e->getFaultCode()." : ".$e->getFaultString()."\n";
  20. }
  21. ?>
  22.  
Add New Note User Contributed Notes for campaignSendNow
No notes, yet... Will you be the first??