Replies: 1 comment 2 replies
-
There's a trait called
Then you can use it to send Notifications (with jobs (to queue), or anything really!):
It is more dynamic and the proper way of sending. Making Laravel use a default to-email is not a good idea imo.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've just spent a few hours of debugging sent emails in my application as I was not aware of the "universal to" email. The docs explained this very clearly when I was reading it through.
My initial expectation when I set the to-email in the config was that I had to use it myself, and not that it would override the emails set in the to method of the mail facade.
This brought a thought to me that it would be handy to have a "default to" address, as that was what I needed. This will only be used if there is no email address passed into the to method.
It seems like there are more people like me out there: https://laracasts.com/discuss/channels/laravel/default-to-address-in-mail
Beta Was this translation helpful? Give feedback.
All reactions