Back to Documentation Overview
campaignSendTest
public static campaignSendTest(string apikey, string cid, array test_emails, string send_type)
Send a test of this campaign to the provided email address
- Section:
- Campaign Related
- Parameters:
apikey a valid API Key for your user account. Get by calling login() cid the id of the campaign to test test_emails an array of email address to receive the test message send_type optional - by default (null) both formats are sent - "html" or "text" send just that format - Returns:
- boolean - true on success
- <?php
- /**
- This Example shows how to send Campaign Tests via the MCAPI class.
- Note that a max of 25 of these may be sent
- **/
- require_once 'inc/MCAPI.class.php';
- require_once 'inc/config.inc.php'; //contains apikey
- $retval = $api->campaignSendTest($campaignId, $emails);
- if ($api->errorCode){
- } else {
- }
- <?php
- /**
- This Example shows how to immediately Send a Test message for a prepared Campaign
- using XML-RPC.
- Note that a max of 25 of these may be sent
- 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->campaignSendTest($apikey, $campaignId, $emails);
- } catch (XML_RPC2_FaultException $e){
- }
- ?>
Examples (2)
download example code[1] mcapi_campaignSendTest.php
[2] xml-rpc_campaignSendTest.php
|
Add New Note
User Contributed Notes for
campaignSendTest |
|---|
| No notes, yet... Will you be the first?? |