承接 vision/yii2-queue-mails 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vision/yii2-queue-mails

Composer 安装命令:

composer require vision/yii2-queue-mails

包简介

Queue mails

README 文档

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist vision/yii2-private-messages "@dev"

or add to the require section of your composer.json file.

"vision/yii2-queue-mails":"~1.0.0"

Configuration

Once the extension is installed, add following code to your application configuration :

       'mailer' => [
           'class' => 'vision\queue_mails\Mailer',
           'mailsPerRound' => 5,
           'realMailer' => [
               'class' => '****',
               'apikey' => '*****'
           ]
       ],

and /config/console.php:

       'mailer' => [
           'class' => 'vision\queue_mails\Mailer',
           'mailsPerRound' => 5,
           'realMailer' => [
               'class' => '****',
               'apikey' => '*****'
           ]
       ],
 ```

Following properties are available for customizing the mail queue behavior.

mailsPerRound: Number of emails to send at a time.

Run yii migrate command in command line:

php yii migrate --migrationPath=@vendor/vision/yii2-queue-mails/migrations


Most preferably this could be a console command (eg: mail/send) which can be triggered by a CRON job.
-----

Setting the CRON job

Set a CRON job to run console command:

*/10 * * * * php /var/www/html/myapp/yii mail/send

Usage
-----

Yii::$app->mailer->compose('contact/html', ['contactForm' => $form]) ->setFrom('from@domain.com') ->setTo($form->email) ->setSubject($form->subject) ->send();


Processing the mail queue
-----

Now calling Yii::$app->mailqueue->process() will process the message queue and send out the emails. 

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-12-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固