the-real-start/yii2-async-notifications
Composer 安装命令:
composer require the-real-start/yii2-async-notifications
包简介
Notification component to run async mail,push and sms notifications sending.
README 文档
README
Overview
Purpose of this package is to build easy to use asyncronious notification system in yii2 project.
Package allowes to send e-mail, and push notifications to apple and google play cloud.
For queue management Rabbit MQ is used.
Package is pretty raw and has a lot of rooms for improvement.
We are open to new pull requests, suggestions.
Install
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist the-real-start/yii2-async-notifications "*"
or add
"the-real-start/yii2-async-notifications": "*"
to the require section of your composer.json file.
Configuration
In common/config/main-local.php add amqp component:
...
'amqp' => [
'class' => TRS\AsyncNotification\components\amqp\Amqp::className(),
'host' => '127.0.0.1',
'port' => 5672,
'user' => 'guest',
'password' => 'guest',
'vhost' => '/',
'exchange' => 'my-exchange-name',
'exchangeType' => \TRS\AsyncNotification\components\amqp\Amqp::TYPE_DIRECT,
'exchangeArgs' => []
],
...
Change parameters depending on your local environment.
This component set's up connection with rabbitmq.
Then setup notifications you'd like to proceed.
For instance mail:
...
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => false,
],
...
Work in progress
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-29