Laravel: Sending Mail with Queue ignores Locale
Laravel: Sending Mail with Queue ignores Locale My Email template looks like this: @component('mail::message') # {{ $helloUser }} @lang('welcome.message') This App::setLocale('de); $activeMail = new AppMailRegisterActivate($user); Mail::to($user)->send($activeMail); will send an mail with German text. However, when I use a queue App::setLocale('de); $activeMail = new AppMailRegisterActivate($user); Mail::to($user)->queue($activeMail); The mail is send in English, which is the default language of my app. How can I send a message in German with the queue without changing the default language? 2 Answers 2 In Laravel 5.6. the Mailable class has gotten a locale method to care for this: Mailable locale $activeMail = new AppMailRegisterActivate($user)->locale('tr'); Mail::to($user)->queue($activeMail); For Laravel < 5.6 you have to save the text in the ma...
