MailChimp integration for YeahCoach project

Installs: 1 408

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0


0.1.3 2018-05-25 12:06 UTC

This package is not auto-updated.

Last update: 2024-06-09 03:39:56 UTC


MailChimp API (v3) integration developed for YeahCoach project.


Extension installaton

Use composer to install the extension to your Yii2 installation.

Component Setup

The extension works as a standard Yii2 component.

To use it, just add and configure it inside the main.php configuration array (or wherever suitable for your setup), e.g.

    'components' => [    
        // ...
        'mailChimp' => [
            'class' => 'dlds\mailchimp\YcMailChimp',
            'apiKey' => 'a576b8adf6d34916d2f7eedf0eb4dd2f-us17',
            'listId' => '123abc4560',
            'categoryId' => 'def890abcd'

Required initial values are only class and apiKey, but it's recommended to specify all properties as shown to avoid the need to pass them later (you can always override the default values and pass them as method parameters).

Usage example

Example usage:

// load the component
$chimp = Yii::$app->mailChimp;

// get unsubscribed users on your MailChimp list
$resultObject = $chimp->getUnsubscribedContacts();

// print returned array of MailChimpBasicUser objects


Codeception unit tests are included. From the root directory:

php ./vendor/bin/codecept run unit

Built with

  • MailChimp API - simple MailChimp API wrapper (uses cURL for API calls)