Tutorials and Examples

The easiest way to learn our api is to start using it. To get started first download the examples, insert your key and secret into sailthru_config.php, and begin the detailed step by step tutorials listed below or jump right in with the examples further down the page:

Examples

  • Add a user to a list
     $sailthru->setEmail(
                 'joe@example.com',  
                 array('name' => 'Joe Schmoe',
                 'gender' => 'M'),
                 array('mylist' => 1));
  • Unsubscribe a user
    $sailthru->setEmail(
                 'joe@example.com',  
                 null,
                 array('mylist' => 0));
  • Send a welcome message
    $sailthru->send('Welcome Template', 'joe@example.com')
  • Send a campaign message
    $sailthru->scheduleBlast(
                'My Email Campaign', 
                'mylist',
                '7/04/11 11:00 AM',
                'Sailthru Support',
                'support@sailthru.com',
                'Hello Everyone',
                'This is where the content of the message would go'
    );
 
/var/www/docs.sailthru.com/htdocs/data/pages/api/tutorials.txt · Last modified: 2011/09/06 19:06 by gavin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki