2017 © Pedro Peláez
 

yii2-extension yii2-async-mailer

Async mailer decorator for Yii2

image

yarcode/yii2-async-mailer

Async mailer decorator for Yii2

  • Tuesday, November 28, 2017
  • by lagman
  • Repository
  • 1 Watchers
  • 4 Stars
  • 420 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

yarcode/yii2-async-mailer

Async mailer decorator for Yii2, (*1)

Installation

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

Either run, (*3)

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

or add, (*4)

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

Usage

Configure async component of your application. You can find the details here: https://packagist.org/packages/bazilio/yii2-async, (*5)

Configure YarCode\Yii2\AsyncMailer\Mailer as your primary mailer., (*6)

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

Add mailer command to the console config file., (*7)

  'controllerMap' => [
      'mailer' => [
          'class' => '\YarCode\Yii2\AsyncMailer\MailerCommand',
      ],
  ],

Run the mailer daemon in the background., (*8)

yii mailer/daemon

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

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

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

The Versions

28/11 2017

dev-master

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

Async mailer decorator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 mailer queue async

28/11 2017
28/07 2016
28/07 2016
26/07 2016

0.1

0.1.0.0 http://packagist.org/packages/yarcode/yii2-async-mailer

Async mailer decorator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 mailer queue async