Laravel Send Email using Queue

Step 1: Setup Laravel

Step 2: Create Mail Setup

app/Mail/SendEmailTest.php

resources/views/emails/test.blade.php

Step 3: Configuration of Queue

.env

QUEUE_CONNECTION=database

Step 4: Generate Migration:

Step 5: Run Migration:

Step 6: Create Queue Job

app/Jobs/SendEmailJob.php

Step 7: Test Queue Job:

routes/web.php

Next, you must have to run following command to see queue process, you must have to keep start this command:

In Server:

a. **Installing Supervisor:

For automatically restart your queue:work processes in server.

laravel-worker.conf file:

b. **Starting Supervisor:

c. Others command:

--

--

Senior Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store