Last active
May 30, 2022 03:13
-
-
Save carltondickson/ad979cc684027b64c0ff95383ae1c18c to your computer and use it in GitHub Desktop.
Laravel Queue mailable via tinker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create mailable, e.g. MailableTest | |
php artisan make:mail MailableTest --markdown=emails.mailable-test | |
// Run horizon or queue worker | |
// Open tinker | |
$mailable = (new \App\Mail\MailableTest())->onQueue('queue-name'); | |
Mail::to('somemail@example.com')->send($mailable); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This does not seem to work. Laravel will send the email synchronously.
Below worked: