-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCampaign.Create.php
More file actions
39 lines (27 loc) · 1.27 KB
/
Copy pathCampaign.Create.php
File metadata and controls
39 lines (27 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
ini_set ('display_errors', 1);
error_reporting (E_ALL);
require_once('CMBase.php');
//-----------------------------INPUT PARAMS---------------------------------------
$apikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$clientid = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$campaign_name = 'March newsletter';
$subject = 'March newsletter';
$from_name = 'John Smith';
$from_email = 'john@smith.com';
$reply_email = 'john@smith.com';
$html_content = 'http://www.campaignmonitor.com/uploads/templates/previews/template-1-left-sidebar/index.html';
$text_content = 'http://www.campaignmonitor.com/uploads/templates/previews/template-1-left-sidebar/textversion.txt';
$subscriber_listid = array('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
$subscriber_segments = "";
//-------------------------------------------------------------------------------
$cm = new CampaignMonitor( $apikey );
//Optional statement to include debugging information in the result
$cm->debug_level = 1;
//This is the actual call to the method
$result = $cm->campaignCreate( $clientid, $campaign_name, $subject, $from_name, $from_email, $reply_email, $html_content, $text_content, $subscriber_listid, "" );
echo '<br><br>';
print_r($result);
//Print out the debugging info
//print_r($cm);
?>