Change Laravel Mail driver at run time for queued jobs

Posted 8 months ago by amrsoft

Hello all ,

i have diffract mail driver on my app

ses , and , sparkpost

sparkpost is default

i use queue to send emails so when i use

 \Config::set('mail.driver', 'ses');
 (new MailServiceProvider(app()))->register();  

queue stil send from sparkpost

i hace found this package

but also developer leave this note

Changing the mail driver at runtime will not affect the driver of a queueing sending job, it is only effectual during the current app lifetime.

any help , thanks

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.