.cursor/skills/laravel-best-practices/rules/mail.md
ShouldQueue on the Mailable ClassMakes queueing the default regardless of how the mailable is dispatched. No need to remember Mail::queue() at every call site — Mail::send() also queues it.
afterCommit() on Mailables Inside TransactionsA queued mailable dispatched inside a transaction may process before the commit. Use $this->afterCommit() in the constructor.
assertQueued() Not assertSent() for Queued MailablesMail::assertSent() only catches synchronous mail. Queued mailables fail assertSent with a "Did you mean to use assertQueued()?" hint.
Incorrect: Mail::assertSent(OrderShipped::class); when mailable implements ShouldQueue.
Correct: Mail::assertQueued(OrderShipped::class);
Markdown mailables auto-generate both HTML and plain-text versions, use responsive components, and allow global style customization. Generate with --markdown flag.
Content tests: instantiate the mailable directly, call assertSeeInHtml().
Sending tests: use Mail::fake() and assertSent()/assertQueued().
Don't mix them — it conflates concerns and makes tests brittle.