Skip to content

A free open source IT asset/license management system

Merge pull request #18543 from Godmartinz/changing-recipient-header-to-cc

snipe0b7ebcaeb0dc
diff --cc app/Listeners/CheckoutableListener.php
index 0c064dbab6,65c1b796cf..6a9a0fc1ff
--- a/app/Listeners/CheckoutableListener.php
+++ b/app/Listeners/CheckoutableListener.php
@@@ -31,16 -31,14 +31,15 @@@ use App\Notifications\CheckoutAssetNoti
use App\Notifications\CheckoutComponentNotification;
use App\Notifications\CheckoutConsumableNotification;
use App\Notifications\CheckoutLicenseSeatNotification;
+use Exception;
use GuzzleHttp\Exception\ClientException;
use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Facades\Context;
+use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification;
-use Exception;
-use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Osama\LaravelTeamsNotification\TeamsNotification;
-
class CheckoutableListener
{
private array $skipNotificationsFor = [
@@@ -101,19 -99,19 +100,19 @@@
Mail::to(array_flatten($to))->send($toMail);
Log::info('Checkout Mail sent to checkout target');
} catch (ClientException $e) {
- Log::debug("Exception caught during checkout email: " . $e->getMessage());
+ Log::debug('Exception caught during checkout email: '.$e->getMessage());
} catch (Exception $e) {
- Log::debug("Exception caught during checkout email: " . $e->getMessage());
+ Log::debug('Exception caught during checkout email: '.$e->getMessage());
}
}
- if (!empty($cc)) {
+ if (! empty($cc)) {
try {
$ccMail = (clone $mailable)->locale(Setting::getSettings()->locale);
- Mail::to(array_flatten($cc))->send($ccMail);
+ Mail::cc(array_flatten($cc))->send($ccMail);
} catch (ClientException $e) {
- Log::debug("Exception caught during checkout email: " . $e->getMessage());
+ Log::debug('Exception caught during checkout email: '.$e->getMessage());
} catch (Exception $e) {
- Log::debug("Exception caught during checkout email: " . $e->getMessage());
+ Log::debug('Exception caught during checkout email: '.$e->getMessage());
}
}
}
@@@ -207,19 -201,19 +206,19 @@@
Mail::to(array_flatten($to))->send($toMail);
Log::info('Checkin Mail sent to checkin target');
} catch (ClientException $e) {
- Log::debug("Exception caught during checkin email: " . $e->getMessage());
+ Log::debug('Exception caught during checkin email: '.$e->getMessage());
} catch (Exception $e) {
- Log::debug("Exception caught during checkin email: " . $e->getMessage());
+ Log::debug('Exception caught during checkin email: '.$e->getMessage());
}
}
- if (!empty($cc)) {
+ if (! empty($cc)) {
try {
$ccMail = (clone $mailable)->locale(Setting::getSettings()->locale);
- Mail::to(array_flatten($cc))->send($ccMail);
+ Mail::cc(array_flatten($cc))->send($ccMail);
} catch (ClientException $e) {
- Log::debug("Exception caught during checkin email: " . $e->getMessage());
+ Log::debug('Exception caught during checkin email: '.$e->getMessage());
} catch (Exception $e) {
- Log::debug("Exception caught during checkin email: " . $e->getMessage());
+ Log::debug('Exception caught during checkin email: '.$e->getMessage());
}
}
}