Skip to content

Mail::alwaysTo not working for synced mails #53727

Answered by munezaclovis
vatsake asked this question in Q&A
Discussion options

You must be logged in to vote

@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

if(!app()->isProduction){
    config()->set('mail.to', ['address' => 'John.Doe@mail.com', 'name' => 'John Doe'])
}

I haven't tested this so you might wanna check

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vatsake
Comment options

Answer selected by vatsake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #53614 on December 02, 2024 08:21.