resohead /
laravel-test-mail
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Resohead\LaravelTestMail; |
||
| 4 | |||
| 5 | use Illuminate\Bus\Queueable; |
||
| 6 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
| 7 | use Illuminate\Mail\Mailable; |
||
| 8 | use Illuminate\Queue\SerializesModels; |
||
| 9 | |||
| 10 | class TestMailable extends Mailable |
||
| 11 | { |
||
| 12 | use Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 13 | |||
| 14 | public $recipient; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Create a new message instance. |
||
| 18 | * |
||
| 19 | * @return void |
||
| 20 | */ |
||
| 21 | 11 | public function __construct(String $recipient) |
|
| 22 | { |
||
| 23 | 11 | $this->recipient = $recipient; |
|
| 24 | 11 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * Build the message. |
||
| 28 | * |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | 10 | public function build() |
|
| 32 | { |
||
| 33 | 10 | return $this->subject('Test email from '. config('app.name')) |
|
| 34 | 10 | ->to($this->recipient) |
|
| 35 | 10 | ->markdown('laravel-test-mail::emails.test'); |
|
| 36 | } |
||
| 37 | } |
||
| 38 |