mail wip
This commit is contained in:
1 parent
521e617879
commit
f9e1f9b49c
17 files changed
+295
-80
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Mail\Newsletter;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class SendNewsletterJob implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public $mail_data;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct($mail_data)
|
||||
{
|
||||
$this->mail_data = $mail_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
Mail::to($this->mail_data->email)->send(new Newsletter($this->mail_data));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user