Download the PHP package audriusdob/yii2-mandrill without Composer

On this page you can find all versions of the php package audriusdob/yii2-mandrill. 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 yii2-mandrill

Mandrill API Extension

Mandrill Api Integration for Yii2
Latest Stable Version Build Status Total Downloads License

Change Log

Since version 1.6.1 the methods and do not purify/encode the data automatically.

This has been done to offer a greater degree of flexibility to developers, see issues #16 and #19.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Set Up

To use Mandrill you will need to have a Mandrill Account.

Every single account can send up to 12k emails per month for free.

The cost for sending emails over that threshold is really low.

Once you have an account you will need to create an API Key.
You can create as many API keys as you want, and it's best practice to create one for each website.
You can also create test API keys. Every email submitted using a test API key will not actually be submitted, but you'll be able to check inside the test dashboard if the test went thorugh successfully.

Mandrill will keep track of every single email you submit. You can filter the data using tags and you'll also be able to check how many times each email was opened and if the links within it have been clicked.

Usage

Once the extension is installed, change your application config file :

First of all you will need to add an . By default this extension will send every single email using the application name as the sender name and the parameter inside as the sender email.

You will then need to add the component

From now on you can just use the mandrill mailer just as you used to use the default one.

Mandrill Templates

You can use Mandrill's own template system if you want to, just set up as true the attribute in the component configuration

If you do turn this feature on the component will look for a template within mandrill named after the view argument of the compose method.

Since version 1.3.0 the component will stop falling back to rendering the internal views. This change has been made because now the mandrill send-template method will be used, avoiding to make two API calls when templates are enabled.

Since version 1.4.0 the component won't default to the application name and admin email when using mandrill templates. This has been done to allow the use of Mandrill defaults values for the template.

To override this behavior you can set to false the attribute in the component configuration

Since version 1.5.0 the component has a configurable property that can contain either 'mailchimp' or 'handlebars' ('mailchimp' is by default).

For more information about handlebars usage check these links:

You can change preferred language by editing attribute in the component configuration

Additional Methods

Mandrill lets you set up tags. The method accept as an argument both a string or an array of strings:

Since version 1.3.0 it's also possible to enable the async mode. When using async mode mandrill will queue the messages and send em in batches. If you send a message to more than 10 email addresses async mode will be used automatically.

Since version 1.4.0 it's also possible to use global merge vars. This variables will be use to replace placeholders by mandrill. This is especially useful when dealing with templates.

Since version 1.6.0 you can get the Mandrill object used by the component calling the method.

For more informations check the component documentation.

Unit Testing

All the Classes within the package have been unit tested.
The tests are included within the package.

If you wish to run the tests install codeception following the Yii2 documentation.

The tests use the developer Mandrill Test API key which is only whitelisted for the developer IP.

Logs

The component automatically logs every single message sent through mandrill, inside the "mandrill" category.

Messages sent successfully are logged using , messages rejected or invalid are logged using , and all the exceptions thrown by the Mandrill Class are logged using .

If you are using mandrill templates and the template is not found the error will be logged using .


All versions of yii2-mandrill with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
mandrill/mandrill Version *
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 audriusdob/yii2-mandrill contains the following files

Loading the files please wait ....