2017 © Pedro Peláez
 

yii2-extension yii2-spoolmailer

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

image

izumi-kun/yii2-spoolmailer

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  • Thursday, November 30, 2017
  • by Izumi-kun
  • Repository
  • 2 Watchers
  • 3 Stars
  • 286 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 12 % Grown

The README.md

SwiftMailer Extension for Yii 2 with Spooling

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension., (*1)

It supported queues based on built-in SwiftMailer spools or Yii2 Queue Extension., (*2)

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Code Coverage, (*3)

Installation

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

Either run, (*5)

php composer.phar require --prefer-dist izumi-kun/yii2-spoolmailer

or add, (*6)

"izumi-kun/yii2-spoolmailer": "~1.0.0"

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

Basic Usage

This way uses built-in SwiftMailer spools: FileSpool (default) or MemorySpool., (*8)

Add the following code in your application configuration (both web and console):, (*9)

return [
    //....
    'components' => [
        //....
        'mailer' => [
            'class' => izumi\spoolmailer\Mailer::class,
        ],
    ],
];

Add the following code in your console configuration:, (*10)

return [
    //....
    'controllerMap' => [
        'mail' => izumi\spoolmailer\MailController::class,
    ],
];

You can then add an email in queue as follows:, (*11)

Yii::$app->mailer->compose('contact/html')
     ->setFrom('from@domain.com')
     ->setTo($form->email)
     ->setSubject($form->subject)
     ->queue();

Process email queue by follow console command:, (*12)

./yii mail/flush

CRON job:, (*13)

* * * * * php /var/www/yii-app/yii mail/flush >/dev/null 2>&1

Advanced Usage

This way requires Yii2 Queue Extension in your application., (*14)

Add the following code in your application configuration (both web and console):, (*15)

return [
    //....
    'components' => [
        //....
        'mailer' => [
            'class' => izumi\spoolmailer\Mailer::class,
            'spoolMailer' => [
                'class' => izumi\spoolmailer\spools\QueueSpool::class,
                'queue' => 'queue', // the application component ID of the queue object
            ],
        ],
    ],
];

For more details see the Yii2 Queue Guide., (*16)

License

BSD-3-Clause, (*17)

The Versions

30/11 2017

dev-master

9999999-dev

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

30/11 2017

0.5.0

0.5.0.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

30/10 2017

0.4.0

0.4.0.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

14/10 2017

0.3.0

0.3.0.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

14/10 2017

0.2.1

0.2.1.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

27/03 2017

dev-add-unit-tests

dev-add-unit-tests

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

18/03 2017

0.2.0

0.2.0.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

18/03 2017

0.1.1

0.1.1.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling

18/03 2017

0.1.0

0.1.0.0

Implements email queue using SwiftMailer spool transport and yii2-swiftmailer extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

email extension yii2 swiftmailer queue yii2-swiftmailer spooling