A free open source IT asset/license management system
sends an email for to locale and cc locale
Godfrey M128bdf500abc
diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.phpindex 73e26422f6..a029e97df1 100644--- a/app/Http/Controllers/Account/AcceptanceController.php+++ b/app/Http/Controllers/Account/AcceptanceController.php@@ -248,15 +248,15 @@ class AcceptanceController extends Controller// Add the attachment for the signing user into the $data array$data['file'] = $pdf_filename;-+ $locale = $assigned_user->locale;try {- $assigned_user->notify(new AcceptanceAssetAcceptedToUserNotification($data));+ $assigned_user->notify((new AcceptanceAssetAcceptedToUserNotification($data))->locale($locale));} catch (\Exception $e) {Log::warning($e);}}try {- $acceptance->notify(new AcceptanceAssetAcceptedNotification($data));+ $acceptance->notify((new AcceptanceAssetAcceptedToUserNotification($data))->locale(Setting::getSettings()->locale));} catch (\Exception $e) {Log::warning($e);}diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.phpindex 7e289b19e6..9674bd63a3 100644--- a/app/Listeners/CheckoutableListener.php+++ b/app/Listeners/CheckoutableListener.php@@ -96,7 +96,8 @@ class CheckoutableListenerif (!empty($to)) {try {- Mail::to(array_flatten($to))->cc(array_flatten($cc))->send($mailable);+ Mail::to(array_flatten($to))->send($mailable->locale($notifiable->locale));+ Mail::to(array_flatten($cc))->send($mailable->locale(Setting::getSettings()->locale));Log::info('Checkout Mail sent to checkout target');} catch (ClientException $e) {Log::debug("Exception caught during checkout email: " . $e->getMessage());@@ -180,7 +181,8 @@ class CheckoutableListenertry {if (!empty($to)) {- Mail::to(array_flatten($to))->cc(array_flatten($cc))->send($mailable);+ Mail::to(array_flatten($to))->send($mailable->locale($notifiable->locale));+ Mail::to(array_flatten($cc))->send($mailable->locale(Setting::getSettings()->locale));Log::info('Checkin Mail sent to CC addresses');}} catch (ClientException $e) {