Skip to content
No description, website, or topics provided.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
IldarMailchimp.php
README.md

README.md

IldarMailchimp php

php class for work with MailChimp API v3.0

Examples


// get lists recipients
$lists = $chimp->getLists($list_id);

...
$segment_name = 'email for Gold and Silver';
$segment_cond = array(
    'match'      => 'any',
    'conditions' => array(
        array(
            'condition_type' => 'TextMerge',
            'field'          => 'LNAME',
            'op'             => 'contains',
            'value'          => 'Gold'
        ),
        array(
            'condition_type' => 'TextMerge',
            'field'          => 'LNAME',
            'op'             => 'contains',
            'value'          => 'Silver'
        )
    )
);



// Create recipients segment
$new_segment = $chimp->createSegment($segment_name, $list_id, $segment_cond);
$new_segment_id = $new_segment->id;

// Create camping for
$camping = $chimp->createCamping($list_id, $email_subject, $from_name, $reply_email, $new_segment_id);


// Add camping content
$res = $chimp->createCampingContent($plain, $html, $camping);

// Send camping
$res = $chimp->sendCamping($camp_id);
You can’t perform that action at this time.