2017 © Pedro Peláez
 

yii2-module yii2-sendgrid-unsubscribe

A Yii2 module to easily provide public unsubscribe urls with suppression group support.

image

ethercreative/yii2-sendgrid-unsubscribe

A Yii2 module to easily provide public unsubscribe urls with suppression group support.

  • Wednesday, March 16, 2016
  • by mattether
  • Repository
  • 3 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-sendgrid-unsubscribe

A Yii2 module to easily provide public unsubscribe urls with suppression group support., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require ethercretaive/yii2-sendgrid-unsubscribe "~1.0.0"

or add, (*4)

"ethercreative/yii2-sendgrid-unsubscribe": "~1.0.0"

to the require section of your composer.json file., (*5)

Usage

This plugin assumes you are using shershennm/yii2-sendgrid, (*6)

Once the extension is installed, simply modify your application configuration as follows:, (*7)

return [
    'modules' => [
        'unsubscribe' => [
            'class' => 'ethercreative\unsubscribe\Module',

            // the following are optional

            // default group to unsubscribe from
            'default' => 70,

            // flash message options
            'flashMessage' => 'Your email address has successfully been unsubscribed',
            'flashGroup' => 'unsubscribe-success',

            // where to redirect to, after success
            // defaults to `Url::home()`
            'redirect' => ['/site/login'],

            // if you want to hide the IDs of your suppression groups, use `groups` to convert
            // the following will allow you to use
            //     `?email=email@address.com&group=messages`
            //     `?email=email@address.com&group=Y30JOMJjA7V7bcAC`
            'groups' => [
                'messages' => 70,
                'Y30JOMJjA7V7bcAC' => 80,
            ],
        ],
        // ...
    ],
    // ...
];

You can then generate links to /unsubscribe/?email={email}&group={id/key}, (*8)

Url::to(['/unsubscribe', 'email' => $email, 'group' => $group], true);

The Versions

16/03 2016

dev-master

9999999-dev

A Yii2 module to easily provide public unsubscribe urls with suppression group support.

  Sources   Download

MIT

The Requires

 

by Matt Edmonston

yii2 module sendgrid

16/03 2016

1.0.0

1.0.0.0

A Yii2 module to easily provide public unsubscribe urls with suppression group support.

  Sources   Download

MIT

The Requires

 

by Matt Edmonston

yii2 module sendgrid