-
Say I want to optionally BCC some user whenever I send an email:
If that BCC user email address is not defined in config, the The clunky solution to this is (given that I'm not aware of a way to make an inline call conditional):
every time I send a message. Before I think about making a PR for this, would it be reasonable for Laravel to adjust the mail component so that it ignores null addressees so that we can use the former syntax, i.e. so that |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I found a workaround for this. When setting the config value from .env, I I could have it fall back to the empty value that bcc uses:
however, this doesn't work because an empty (rather than missing) value doesn't fall through to the default in
This feels "wrong" because the config value should not need to know about the internal workings of the bcc mechanism, but it is at least workable. |
Beta Was this translation helpful? Give feedback.
-
What about |
Beta Was this translation helpful? Give feedback.
-
PR was made and merged! |
Beta Was this translation helpful? Give feedback.
PR was made and merged!