Mail::alwaysTo not working for synced mails #53727
-
Laravel Version11.24.1 PHP Version8.3.6 Database Driver & VersionNo response DescriptionIn my AppServiceProvider boot method I have
I have a job that sends an email.
Steps To ReproduceIf sending email like this: If dispatching like this: BTW I'm using octane, so it might be 1 reason why it doesn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, this is due to Octane as the service providers will only load once while the mailers get reset on each request. |
Beta Was this translation helpful? Give feedback.
-
@vatsake I think if you might be able to fix this if you directly set this on the config, this would always work as expected since Laravel loads the mail config anytime a mailer gets created
I haven't tested this so you might wanna check |
Beta Was this translation helpful? Give feedback.
@vatsake I think if you might be able to fix this if you directly set this on the config, this would always work as expected since Laravel loads the mail config anytime a mailer gets created
I haven't tested this so you might wanna check