Download the PHP package betacie/mailchimp-bundle without Composer

On this page you can find all versions of the php package betacie/mailchimp-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mailchimp-bundle

Build Status

mailchimp-bundle

This bundle will help you synchronise your project's newsletter subscribers into MailChimp.

You can synchronize all your subscribers at once with a Symfony command : new users will be added to MailChimp, existing users will be updated and user no longer in your project will be deleted from MailChimp.

You can also synchronize subscribe / unsubscribe one at a time with events.

Optionnaly, it also help you to synchronize your list merge tags.

Setup

Add bundle to your project:

Add Betacie\MailChimpBundle\BetacieMailChimpBundle to your AppKernel.php:

Configuration

You need to add the list in MailChimp's backend first.

For each list you must define a configuration in your config.yml:

Where listX is the name of your MailChimp lists, and yourapp.providerX is the key of your provider's service that will provide the subscribers that need to be synchronized in MailChimp. The key mc_language is optional and will set this language for all subscribers in this list, see the list of accepted language codes.

Defining lists and providers is necessary only if you use full synchronization with the command.

Usage

Synchronize merge tags

Merge tags (or merge vars) are values you can add to your subscribers (for example the firstsname or birthdate of your user). You can then use these tags in your newsletters or create segments out of them.

To learn more about merge tags, please see this guide on MailChimp.

To synchronize you need to create your lists in MailChimp backend first. Then you need to add them in your config.yml as shown in the MailChimp API.

You can then synchronize the tags using the app/console betacie:mailchimp:synchronize-merge-tags command. Note that every tag that are present in MailChimp but are not defined in your configuration will be deleted along with associated values.

Full synchronization with command

You can synchronize all subscribers of your project at once by calling the Symfony command app/console betacie:mailchimp:synchronize-subscribers. It will first fetch all the subscribers already present in MailChimp and unsubscribe any subscribers that are not in your projet (they might have been deleted on the project side), it will then send all your subscribers to MailChimp, new subscribers will be added and existing subscribers will be updated.

After configuring your lists in config.yml, you need to create at least one Providerthat will be used by the Symfony command. Your provider should be accessible via a service key (the same you reference in subscriber_providers in the configuration above):

It should implement Betacie\MailChimpBundle\Provider\ProviderInterface and return an array of Betacie\MailChimpBundle\Subscriber\Subscriber objects. The first argument of the Subscriber object is its e-mail, the second argument is an array of merge tags values you need to add in MailChimp's backend in your list settings under List fields and *|MERGE|* tags (see this guide on MailChimp to add merge tags in your list).

Unit synchronization with events

If you want realtime synchronization, you can dispatch custom events on your controllers (or anywhere). The subscribe event can be used both for adding a new subscriber or updating an existing one.

Here is an example of a subscribe event dispatch:

If you want to tell MailChimp that an existing subscriber has changed its e-mail, you can do it by adding the new-email option to the merge tags:

Unsubscribe is simpler, you only need the email, all merge tags will be ignored:


All versions of mailchimp-bundle with dependencies

PHP Build Version
Package Version
Requires mailchimp/mailchimp Version ^2.0
phpspec/phpspec Version ~2@dev
psr/log Version ^1.0
symfony/options-resolver Version ~2@dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package betacie/mailchimp-bundle contains the following files

Loading the files please wait ....