send emails asynchronously with laravel 5.5

0

How could I send an email asynchronously or call the function. So that the process of sending the mail is not so slow.

I did the shipping process in the following way, but there is still time processing for the shipment

php artisan make:mail DemoMail

the view of the email:

public function build()
    {
        return $this->view('emails.demo');
    }

method call for sending:

public function index()
    {
        $email = Auth::user()->email;
        Mail::to($email)->send(new DemoMail());
        return view('home');
    }

How you can send the email to be faster or that the page is not blank when you process the shipment.

    
asked by Leoh 16.04.2018 в 03:52
source

0 answers