2017 © Pedro Peláez
 

yii2-extension yii2-queue-mailer

Queue mailer decorator for Yii2 framework

image

yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

  • Wednesday, June 13, 2018
  • by lagman
  • Repository
  • 1 Watchers
  • 2 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Queue mailer decorator for Yii2 framework

Send your emails in the background using Yii2 queues., (*1)

Build Status Latest Stable Version Total Downloads License, (*2)

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist yarcode/yii2-queue-mailer

or add, (*5)

"yarcode/yii2-queue-mailer": "*"

Usage

Configure queue component of your application. You can find the details here: https://www.yiiframework.com/extension/yiisoft/yii2-queue, (*6)

Configure YarCode\Yii2\QueueMailer\Mailer as your primary mailer., (*7)

  'mailer' => [
      'class' => \YarCode\Yii2\QueueMailer\Mailer::class,
      'syncMailer' => [
          'class' => \yii\swiftmailer\Mailer::class,
          'useFileTransport' => true,
      ],
  ],

Now you can send your emails as usual., (*8)

$message = \Yii::$app->mailer->compose()
  ->setSubject('test subject')
  ->setFrom('test@example.org')
  ->setHtmlBody('test body')
  ->setTo('user@example.org');

\Yii::$app->mailer->send($message);

You can also get a background job ID of the last send() or sendMultiple() call., (*9)

$jobId = \Yii::$app->mailer->getLastJobId();

Licence

MIT, (*10)

The Versions

13/06 2018

dev-master

9999999-dev http://packagist.org/packages/yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

yii2 mailer queue async

13/06 2018

1.0.3

1.0.3.0 http://packagist.org/packages/yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

yii2 mailer queue async

31/05 2018

1.0.2

1.0.2.0 http://packagist.org/packages/yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

yii2 mailer queue async

31/05 2018

1.0.1

1.0.1.0 http://packagist.org/packages/yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

yii2 mailer queue async

30/05 2018

1.0

1.0.0.0 http://packagist.org/packages/yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

yii2 mailer queue async