Well... Only mailables may be queued. The closure in your third parameter is not a mailable
A closure is hard to serialize to send as a mailable. Also when sent from within a class it would need to serialize all the current scope if the closure has a use (...) clause.
Create a new Mailable using php artisan make:mail MyMailable and adjust its content as you need.
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class MyMailable extends Mailable implements ShouldQueue
{
use Queueable;
use SerializesModels;
public function build()
{
return $this->view('mail', ['name' => 'Ripon Uddin Arman']);
}
}
And then queue it with
Mail::to('[email protected]')
->cc('[email protected]')
->queue((new MyMailable)->from('[email protected]', 'Laravel'));
References: