Change Laravel Mail driver at run time for queued jobs

Posted 1 year 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.