PHP code example of revision-ten / mailchimp

1. Go to this page and download the library: Download revision-ten/mailchimp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

revision-ten / mailchimp example snippets


new \RevisionTen\Mailchimp\MailchimpBundle(),

RevisionTen\Mailchimp\MailchimpBundle::class => ['all' => true],

$mailchimpService = $this->container->get(MailchimpService::class);

$subscribed = $mailchimpService->subscribe('dailyNewsletterCampagin', '[email protected]', 'My Website', [
    'FNAME' => 'John',
    'LNAME' => 'Doe',
]);

$mailchimpService = $this->container->get(MailchimpService::class);

$unsubscribed = $mailchimpService->unsubscribe('dailyNewsletterCampagin', '[email protected]');