campaignSendNow(string apikey, string cid)
Send a given campaign immediately. For RSS campaigns, this will "start" them.
| Section | Campaign Related |
|---|
| Parameters | |
|---|---|
| apikey | a valid API Key for your user account. Get by visiting your API dashboard |
| cid | the id of the campaign to send |
| Returns | |
|---|---|
| boolean | true on success |
[1] mcapi_campaignSendNow.php
<?php /** This Example shows how to immediately send a Campaign via the MCAPI class. **/ require_once 'inc/MCAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $retval = $api->campaignSendNow($campaignId); if ($api->errorCode){ } else { } ?>
[2] xml-rpc_campaignSendNow.php
<?php /** This Example shows how to immediately Send a prepared Campaign using XML-RPC. Note that we are using the PEAR XML-RPC client and recommend others do as well. **/ require_once 'XML/RPC2/Client.php'; require_once 'inc/config.inc.php'; try { $result = $client->campaignSendNow($apikey, $campaignId); } catch (XML_RPC2_FaultException $e){ } ?>