1-866-284-2541  |  Registered Users LOGIN 

MailChimp Home Learn More Pricing Resource Center Blog Free Trial

MailChimp API
Back to Documentation Overview

campaignSchedule

public static campaignSchedule(string uid, string cid, string schedule_time)

Schedule a campaign to be sent in the future


Section:
Campaign Related

Parameters:
uid the id for your user account. Get by calling login($user, $pass)
cid the id for the campaign to schedule
schedule_time the time to schedule the campaign - in YYYY-MM-DD HH:II:SS format in GMT

Returns:
boolean   -  true on success

Examples (1)

[1] xml-rpc_campaignSchedule.php

  1. <?php
  2. /**
  3. This Example shows how to Schedule a Campaing to be sent at a specified time in the
  4. future using the XML-RPC service 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. // note that the Schedule date MUST be formatted like this:
  15. // '2008-04-01 09:05:21' means 'April 1st, 2008'
  16. $result = $client->campaignSchedule($uuid, $campaignId, $schedule_for);
  17. echo "SUCCESS!\n";
  18. var_dump($result);
  19. } catch (XML_RPC2_FaultException $e){
  20. echo "ERROR!!!!\n";
  21. echo $e->getFaultCode()." : ".$e->getFaultString()."\n";
  22. }
  23. ?>
  24.  
Add New Note User Contributed Notes
campaignSchedule
No notes, yet... Will you be the first??

Email Marketing Resources  |   Free HTML Email Templates  |   Partners  |  Find an Expert  |   Add-ons  |   API  |   Plugins  |   Blog  |  Demos  |  Surveys  |   Webinars  |   Subscribe to our free Email Marketing Tips Newsletter

New Features:  RSS to Email  |   A/B Split Testing Emails  |   Google Analytics Integration  |   Segmentation

Truste Certified Privacy Click to verify BBB accreditation and to see a BBB report ESPC Members MAAWG Email Experience Council Members HACKER SAFE certified sites prevent over 99.9% of hacker crime.
WebAward Winner W3 Award Webby Award Nominee As featured on MSNBC's Your Business Program