2017 © Pedro Peláez
 

cakephp-plugin mandrill-transport-cakephp3

image

orken/mandrill-transport-cakephp3

  • Tuesday, July 31, 2018
  • by Orken
  • Repository
  • 2 Watchers
  • 1 Stars
  • 357 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 13 % Grown

The README.md

MandrillTransport plugin for CakePHP 3+

Installation

You can install this plugin into your CakePHP application using composer., (*1)

The recommended way to install composer packages is:, (*2)

composer require orken/mandrill-transport-cakephp3

Setting up your CakePHP application

In your bootstrap.php, (*3)

Plugin::load('MandrillTransport');

In your app.php file., (*4)

'EmailTransport' => [
  'Mandrill' => [
    'className'      => 'MandrillTransport.Mandrill',
    'api_key'        => 'YOUR_API_KEY',
    'api_key_test'   => 'YOUR_TEST_API_KEY',
    'from'           => 'no-reply@example.com',
    'merge_language' => 'handlebars', //optional, default is handlebars
    'inline_css'     => true, //optional, default is true
  ],
],
'Email' => [
    'mandrill' => [
        'transport' => 'Mandrill',
        'from' => 'you@localhost',
        //'charset' => 'utf-8',
        //'headerCharset' => 'utf-8',
    ],
],

Utilisation

It can be used like normal Mail transport in cakephp., (*5)

If you want to use a template from mailchimp/mandrill, you just have to add the key 'template_name' with the name of the template in your viewVars. And optionnaly other vars which are used in the template., (*6)

$email = new Email('mandrill');
$email->from(['me@example.com' => 'My Site'])
    ->to('you@example.com')
    ->cc('yourcc@exmaple.com') // optional
    ->bcc('yourbcc@exmaple.com') // optional
    ->attachments('/path/to/your/file') // optional
    ->viewVars([
      'template_name' => 'your template name at mandrill',
      'other_var' => 'values', // all the vars from yout template
      ...
    ])
    ->subject('About')  // optional, if missing it takes the template subject
    ->send('My message');

The Versions

31/07 2018

0.9.x-dev

0.9.9999999.9999999-dev

  Sources   Download

20/04 2017

dev-master

9999999-dev https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

20/04 2017

0.97.0

0.97.0.0 https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

04/01 2017

0.96.1

0.96.1.0 https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

27/12 2016

0.96

0.96.0.0 https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

30/09 2016

0.95.x-dev

0.95.9999999.9999999-dev https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

30/09 2016

0.95b

0.95.0.0-beta https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

30/09 2016

0.95.1

0.95.1.0 https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

30/09 2016

0.95.2

0.95.2.0 https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill

30/09 2016

0.95

0.95.0.0 https://github.com/Orken/mandrill-transport-cakephp3

MandrillTransport plugin for CakePHP 3+

  Sources   Download

MIT

The Requires

 

email cakephp mandrill