当前位置: 首页>>代码示例>>PHP>>正文


PHP Mail::sendMailToStack方法代码示例

本文整理汇总了PHP中Mail::sendMailToStack方法的典型用法代码示例。如果您正苦于以下问题:PHP Mail::sendMailToStack方法的具体用法?PHP Mail::sendMailToStack怎么用?PHP Mail::sendMailToStack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mail的用法示例。


在下文中一共展示了Mail::sendMailToStack方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendAdminNotice

 public function sendAdminNotice(Vks $vks)
 {
     $vksArray = $vks->toArray();
     $admins = User::whereIn('role', [ROLE_ADMIN, ROLE_ADMIN_MODERATOR])->get(['login', 'email']);
     if (count($admins)) {
         foreach ($admins as $admin) {
             $message = App::$instance->twig->render('mails/v2/newVksAdminNotificate.twig', array('vks' => $vksArray, 'http_path' => HTTP_BASE_PATH, 'appHttpPath' => NODE_HTTP_PATH));
             Mail::sendMailToStack($admin->email, "Новая заявка на ВКС #{$vks['id']}", $message);
             App::$instance->log->logWrite(LOG_MAIL_SENDED, "Новая заявка на ВКС #{$vks['id']}");
         }
     }
 }
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:12,代码来源:VksMailReportBuilder.php

示例2: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         $vksList = Vks::where('is_verified_by_user', 0)->with('owner', 'location')->get();
         //
         foreach ($vksList as $vks) {
             if ($vks->is_verified_by_user == 0 && date_create($vks->start_date_time) > date_create($vks->update_at) && date_create($vks->start_date_time)->getTimestamp() - date_create($vks->update_at)->getTimestamp() <= 86400) {
                 $t = view('verificationMail', ['vks' => $vks]);
                 \Mail::sendMailToStack($vks->owner->login, "Просим подтвердить проведение ВКС #{$vks->id}", $t->render());
                 $vks->is_verified_by_user = USER_VERIFICATION_MAIL_SENDED;
                 $vks->save();
                 \App::$instance->log->logWrite(LOG_MAIL_SENDED, "Верификационное письмо по ВКС {$vks->id}, отправлено {$vks->owner->login}");
             }
         }
     })->everyMinute()->sendOutputTo('verification_log.txt');
 }
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:22,代码来源:Kernel.php

示例3: pullAndSendRequests

 public function pullAndSendRequests()
 {
     $vc = new Vks_controller();
     $requests = TechSupportRequest::where("status", TechSupportRequest::STATUS_READY_FOR_SEND)->with('attendance', 'owner')->get();
     $temp_mails = 'Tomarov1-iv@mail.ca.sbrf.ru; DenisovDE@ab.srb.local';
     if (count($requests)) {
         foreach ($requests as $request) {
             $vks = Vks::full()->find($request->vks_id);
             $vc->humanize($vks);
             $appHttpPath = NODE_HTTP_PATH;
             $message = App::$instance->twig->render('mails/v2/tech_support/new.twig', compact('request', 'vks', 'appHttpPath'));
             Mail::sendMailToStack($temp_mails, 'Запрос тех. поддержки для точки ' . $request->attendance->name . ' на ВКС #' . $vks->id, $message);
             $request->status = TechSupportRequest::STATUS_DELIVERED;
             $request->save();
         }
     }
 }
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:17,代码来源:TechSupport_controller.php

示例4: function

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$app->get('show', function () {
    //    $vksList = Vks::where('is_verified_by_user',0)->with('owner','location')->get();
    //
    //    foreach ($vksList as $vks) {
    //        $t = view('verificationMail',['vks'=>$vks]);
    //        Mail::sendMailToStack($vks->owner->login, "Просим подтвердить проведение ВКС #{$vks->id}", $t->render());
    //    }
    $vks = Vks::find(532);
    if ($vks->is_verified_by_user == 0 && date_create($vks->start_date_time) > date_create($vks->update_at) && date_create($vks->start_date_time)->getTimestamp() - date_create($vks->update_at)->getTimestamp() <= 86400) {
        $t = view('verificationMail', ['vks' => $vks]);
        Mail::sendMailToStack($vks->owner->login, "Просим подтвердить проведение ВКС #{$vks->id}", $t->render());
        $vks->is_verified_by_user = USER_VERIFICATION_MAIL_SENDED;
        $vks->save();
        App::$instance->log->logWrite(LOG_MAIL_SENDED, "Верификационное письмо по ВКС {$vks->id}, отправлено {$vks->owner->login}");
    }
});
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:28,代码来源:routes.php

示例5: sendConfirmMail

 public function sendConfirmMail($userId)
 {
     $user = User::find($userId);
     if ($user) {
         $message = App::$instance->twig->render('mails/v2/confirm-registration.twig', array('user' => $user->toArray(), 'http_path' => str_replace('index.php', '', NODE_HTTP_PATH), 'appHttpPath' => NODE_HTTP_PATH));
         Mail::sendMailToStack($user->email, "Подтверждение регистрации", $message);
     } else {
         $this->error('no-object');
     }
 }
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:10,代码来源:User_controller.php


注:本文中的Mail::sendMailToStack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。