1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace Illuminate\Mail;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Mail\Mailable as MailableContract;
class SendQueuedMailable
{
/**
* The mailable message instance.
*
* @var Mailable
*/
protected $mailable;
/**
* Create a new job instance.
*
* @param MailableContract $mailable
* @return void
*/
public function __construct(MailableContract $mailable)
{
$this->mailable = $mailable;
}
/**
* Handle the queued job.
*
* @param MailerContract $mailer
* @return void
*/
public function handle(MailerContract $mailer)
{
$mailer->send($this->mailable);
}
}