Send queued mail
This recipe dispatches a job that sends a welcome email.
Configure queue and mail
Use sync locally or for tests:
Use a durable queue in production:
Job
Generate a job that captures the recipient and sends the message when processed.
Dispatch
Dispatch the job after the application has accepted the mail request.
Worker
Run a worker for the connection that receives the queued mail jobs.
For database queues, publish and run queue migrations before starting workers.