From e7671ccdedea66742e35b8c648db5b85887fcbe2 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 4 Dec 2022 18:06:14 +0000 Subject: [PATCH] Fix email test addressing --- app/Console/Commands/SendDigest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/SendDigest.php b/app/Console/Commands/SendDigest.php index c0311ab..056b4cf 100644 --- a/app/Console/Commands/SendDigest.php +++ b/app/Console/Commands/SendDigest.php @@ -51,21 +51,21 @@ class SendDigest extends Command } if ($this->option('weekly')) { - foreach (config('app.weekly_digest_recipients') as $recipient) { + foreach (($test_address ?? config('app.weekly_digest_recipients')) as $recipient) { Log::debug("Weekly digest email sent to '{$recipient}'."); Mail::to($recipient)->send(new Digest('weekly', config('app.current_trip_id'))); } } if ($this->option('fortnightly')) { - foreach (config('app.fortnightly_digest_recipients') as $recipient) { + foreach (($test_address ?? config('app.fortnightly_digest_recipients')) as $recipient) { Log::debug("Fortnightly digest email sent to '{$recipient}'."); Mail::to($recipient)->send(new Digest('fortnightly', config('app.current_trip_id'))); } } if ($this->option('monthly')) { - foreach (config('app.monthly_digest_recipients') as $recipient) { + foreach (($test_address ?? config('app.monthly_digest_recipients')) as $recipient) { Log::debug("Monthly digest email sent to '{$recipient}'."); Mail::to($recipient)->send(new Digest('monthly', config('app.current_trip_id'))); }