Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once 'jsonRPCClient.php';
- $api_key = 'APIKEY';
- $api_url = 'http://api2.getresponse.com';
- $client = new jsonRPCClient($api_url);
- $body = file_get_contents('email.html');
- # find campaign named 'test'
- $campaigns = $client->get_campaigns(
- $api_key,
- array (
- # find by name literally
- 'name' => array ( 'EQUALS' => 'abs_prosignal_email_alert' )
- )
- );
- $CAMPAIGN_ID = array_pop(array_keys($campaigns));
- $result = $client->send_newsletter(
- $api_key,
- array (
- "campaign" => $CAMPAIGN_ID,
- "from_field" => "support@domain.com",
- "reply_to_field" => "support@domain.com",
- "subject" => "My newsletter",
- "name" =>"Support domain",
- 'content' => array(
- 'html' => 'Some HTML content',
- 'plain' => 'Hello there'
- )
- )
- );
- print_r($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement