2017 © Pedro Peláez
 

library yii2-mailjet

Mailjet client with supporting v3.1

image

biozahard/yii2-mailjet

Mailjet client with supporting v3.1

  • Tuesday, October 24, 2017
  • by biozahard
  • Repository
  • 0 Watchers
  • 0 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Mailjet Client supporting v3.1

Create Mailjet Account

mailjet.com, (*1)

Install

composer require biozahard/yii2-mailjet

or add it to your composer.json in the require section, (*2)

"biozahard/yii2-mailjet": "*",

Setup

add/replace this in your config under the components key., (*3)

'components' => [
  'mailer' => [
    'class' => 'biozahard\mailjet\Mailer',
    'apikey' => 'yourApiKey',
    'secret' => 'yourSecret',
  ],
],

Example

Yii::$app->mailer->compose('signup', ['user' => $user])
->setTo($user->email)
->setFrom([Yii::$app->params['noReplyMailAddress'] => Yii::$app->name])
->setSubject('Signup success')
->send();

Setup Event Tracking

Write the tracking item to the mailer config., (*4)

'components' => [
  'mailer' => [
    'class' => 'biozahard\mailjet\Mailer',
    'apikey' => 'yourApiKey',
    'secret' => 'yourSecret',
    'tracking' => [
      'bounce' => 'http://yoururl.com/tracking?event=bounce',
    ],
  ],
],

To activate this url you must run this command at one time., (*5)

Yii::$app->mailer->activateTracking();

The Versions

24/10 2017

dev-master

9999999-dev

Mailjet client with supporting v3.1

  Sources   Download

MIT

The Requires