Skip to content

Conversation

driesvints
Copy link
Member

I took a very very deep dive into the behavior of defining recipients when using Mailables instead of MailMessages in mail notifications and came to the following conclusion: when using Mailables the recipients are always defined explicitly by using the ->to method on the mailable based on the notifiable.

This means that in the case for regular notifiable models the routeNotificationForMail method (or default of ->email for that matter) and for the case of on-demand notifications the recipient defined by the notifiable needs to be explicitly passed to the mailable.

I was genuinely confused myself at first after reviewing the following issue: laravel/framework#36115. I believe adding this extra part to the docs here can clarify a lot for our users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants