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


PHP Mail::later方法代码示例

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


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

示例1: queue

 public function queue()
 {
     $data = ['name' => 'Ryan'];
     Mail::later(5, 'emails.queued_mail', $data, function ($message) {
         $message->to('rkang.sendme@gmail.com', 'Ryan Kang')->subject('Welcome! This is a queued mail');
     });
     return 'Email will be sent in 5 seconds';
 }
开发者ID:rkang30,项目名称:newdev_L5.1,代码行数:8,代码来源:MailController.php

示例2: sendNewsLetter

 public function sendNewsLetter($data, $name, $email, $title)
 {
     Mail::later(1, 'emails.newsletter', ['data' => $data], function ($message) use($name, $email, $title) {
         $message->from(\Cache::get('contactusInfo')->email, 'Newsletter - 7orof.com');
         $message->subject('7orof.com | Newsletter | ' . $title);
         $message->priority('high');
         $message->to($email);
     });
 }
开发者ID:uusa35,项目名称:ebook,代码行数:9,代码来源:PrimaryEmailService.php

示例3: handle

 /**
  * Handle the event.
  *
  * @param  SendRegisterationConfirmationEmail $event
  * @return void
  */
 public function handle(SendRegisterationConfirmationEmail $event)
 {
     $user = $event->user;
     $email = $user->email;
     Mail::later(1, 'emails.confirm', ['data' => ['id' => $user->id]], function ($message) use($email) {
         $message->from(\Cache::get('contactusInfo')->email, ' | 7orof.com');
         $message->subject('7orof.com | Email Confirmation');
         $message->priority('high');
         $message->to($email);
     });
 }
开发者ID:uusa35,项目名称:ebook,代码行数:17,代码来源:SendRegisterationConfirmationEmailListener.php

示例4: callQueue

 protected function callQueue($template, array $values = [], $queueTime = null)
 {
     if (empty($queueTime)) {
         Mail::queue($template, $values, function ($message) {
             $this->sendClosure($message);
         });
         return $this;
     }
     Mail::later($queueTime, $template, $values, function ($message) {
         $this->sendClosure($message);
     });
     return $this;
 }
开发者ID:vultuk,项目名称:MailAwesome,代码行数:13,代码来源:MailAwesome.php

示例5: function

|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
use Illuminate\Support\Facades\Mail;
Route::get('/', function () {
    return view('welcome');
});
Route::post('/search-results', function () {
    return sprintf('Search results For "%s"', Request::input('search'));
});
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::get('mail/queue', function () {
    Mail::later(5, 'emails.queued_email', ['name' => 'sudip sarker'], function ($message) {
        $vari = rand(1, 100);
        $message->to('sudip2222@diu.edu.bd', 'Sudip Kumar Sarker')->subject($vari);
    });
    return 'Email will be sent in 5 secend .....';
});
开发者ID:SUDIP2222,项目名称:Laravel-5-Queues-Testing,代码行数:31,代码来源:routes.php

示例6: function

|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
use Illuminate\Support\Facades\Mail;
Route::get('/', function () {
    return view('welcome');
});
Route::get('mail/queue', function () {
    Mail::later(5, 'emails.queue', ["name" => "Rodolfo"], function ($message) {
        $message->to('gargamer11@gmail.com', 'Kevin Ventura')->subject('Sistema de Colas');
    });
    return 'Este email se enviara en 5 segundos';
});
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
    //
开发者ID:krodo93,项目名称:test,代码行数:31,代码来源:routes.php


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